diff options
| author | Tom Rini <[email protected]> | 2023-02-07 11:42:26 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-02-07 11:42:26 -0500 |
| commit | b69026c91f2e98b247120e217a986f5056724baf (patch) | |
| tree | f1533069fcdbcf265deb0ea6b3b940e81902d9b3 /test/boot/bootdev.c | |
| parent | f8f47e6ff214a3ba7a61025bcc4dc058f507c279 (diff) | |
| parent | 41a29f284cef48a86c86d038c0cd8cc1c851417e (diff) | |
Merge branch '2023-02-07-assorted-updates'
- Default to dynamic LMB allocation, and fix an issue with the EFI one,
assorted TI platform updates, socrates platform updates, switch
qemu-arm to using bootstd, imagetool fixes, macOS host build fixes,
keymile platform upates, spl FPGA load fix, MMC env bugfix, add seama
command, usb bootdev test bugfix.
Diffstat (limited to 'test/boot/bootdev.c')
| -rw-r--r-- | test/boot/bootdev.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index ef5215bbcec..e1eb8ccd9a7 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -18,7 +18,11 @@ #include "bootstd_common.h" /* Allow reseting the USB-started flag */ +#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET) extern char usb_started; +#else +char usb_started; +#endif /* Check 'bootdev list' command */ static int bootdev_test_cmd_list(struct unit_test_state *uts) @@ -316,11 +320,12 @@ static int bootdev_test_hunter(struct unit_test_state *uts) ut_assert_nextline(" 5 ide ide_bootdev"); ut_assert_nextline(" 2 mmc mmc_bootdev"); ut_assert_nextline(" 4 nvme nvme_bootdev"); + ut_assert_nextline(" 4 qfw qfw_bootdev"); ut_assert_nextline(" 4 scsi scsi_bootdev"); ut_assert_nextline(" 4 spi_flash sf_bootdev"); ut_assert_nextline(" 5 usb usb_bootdev"); ut_assert_nextline(" 4 virtio virtio_bootdev"); - ut_assert_nextline("(total hunters: 9)"); + ut_assert_nextline("(total hunters: 10)"); ut_assert_console_end(); ut_assertok(bootdev_hunt("usb1", false)); @@ -328,8 +333,8 @@ static int bootdev_test_hunter(struct unit_test_state *uts) "Bus usb@1: scanning bus usb@1 for devices... 5 USB Device(s) found"); ut_assert_console_end(); - /* USB is sixth in the list, so bit 7 */ - ut_asserteq(BIT(7), std->hunters_used); + /* USB is 7th in the list, so bit 8 */ + ut_asserteq(BIT(8), std->hunters_used); return 0; } @@ -350,7 +355,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); ut_assert_nextline(" 6 ethernet eth_bootdev"); - ut_assert_skip_to_line("(total hunters: 9)"); + ut_assert_skip_to_line("(total hunters: 10)"); ut_assert_console_end(); /* Use the MMC hunter and see that it updates */ @@ -358,7 +363,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt -l", 0)); ut_assert_skip_to_line(" 5 ide ide_bootdev"); ut_assert_nextline(" 2 * mmc mmc_bootdev"); - ut_assert_skip_to_line("(total hunters: 9)"); + ut_assert_skip_to_line("(total hunters: 10)"); ut_assert_console_end(); /* Scan all hunters */ @@ -376,6 +381,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) /* mmc hunter has already been used so should not run again */ ut_assert_nextline("Hunting with: nvme"); + ut_assert_nextline("Hunting with: qfw"); ut_assert_nextline("Hunting with: scsi"); ut_assert_nextline("scanning bus for devices..."); ut_assert_skip_to_line("Hunting with: spi_flash"); @@ -394,11 +400,12 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline(" 5 * ide ide_bootdev"); ut_assert_nextline(" 2 * mmc mmc_bootdev"); ut_assert_nextline(" 4 * nvme nvme_bootdev"); + ut_assert_nextline(" 4 * qfw qfw_bootdev"); ut_assert_nextline(" 4 * scsi scsi_bootdev"); ut_assert_nextline(" 4 * spi_flash sf_bootdev"); ut_assert_nextline(" 5 * usb usb_bootdev"); ut_assert_nextline(" 4 * virtio virtio_bootdev"); - ut_assert_nextline("(total hunters: 9)"); + ut_assert_nextline("(total hunters: 10)"); ut_assert_console_end(); ut_asserteq(GENMASK(MAX_HUNTER, 0), std->hunters_used); @@ -585,8 +592,8 @@ static int bootdev_test_next_label(struct unit_test_state *uts) ut_asserteq_str("scsi.id0lun0.bootdev", dev->name); ut_asserteq(BOOTFLOW_METHF_SINGLE_UCLASS, mflags); - /* SCSI is sixth in the list, so bit 5 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(5), std->hunters_used); + /* SCSI is 7th in the list, so bit 6 */ + ut_asserteq(BIT(MMC_HUNTER) | BIT(6), std->hunters_used); ut_assertok(bootdev_next_label(&iter, &dev, &mflags)); ut_assert_console_end(); @@ -596,7 +603,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) mflags); /* dhcp: Ethernet is first so bit 0 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); ut_assertok(bootdev_next_label(&iter, &dev, &mflags)); ut_assert_console_end(); @@ -606,7 +613,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) mflags); /* pxe: Ethernet is first so bit 0 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); mflags = 123; ut_asserteq(-ENODEV, bootdev_next_label(&iter, &dev, &mflags)); @@ -614,7 +621,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) ut_assert_console_end(); /* no change */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); return 0; } |
