diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 20:47:45 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-24 02:11:40 +0300 |
commit | 8f090b67d07461cb8313ab08a4d6f44ea9902cf7 (patch) | |
tree | f34ac33bc8c8662779c6d98d7b49cc513efc4907 /test | |
parent | 6febc264711cbebcd91cb06c2d1bf0b181178fcc (diff) | |
download | u-boot-8f090b67d07461cb8313ab08a4d6f44ea9902cf7.tar.xz |
bootstd: Add a SCSI bootdev
Add a bootdev for SCSI so that these devices can be used with standard
boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/boot/bootdev.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index db0e0ca20f..5661a3c000 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -240,8 +240,9 @@ static int bootdev_test_hunter(struct unit_test_state *uts) ut_assert_nextlinen("----"); ut_assert_nextline(" 50 ethernet eth_bootdev"); ut_assert_nextline(" 10 mmc mmc_bootdev"); + ut_assert_nextline(" 30 scsi scsi_bootdev"); ut_assert_nextline(" 40 usb usb_bootdev"); - ut_assert_nextline("(total hunters: 3)"); + ut_assert_nextline("(total hunters: 4)"); ut_assert_console_end(); ut_assertok(bootdev_hunt("usb1", false)); @@ -249,8 +250,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 third in the list, so bit 2 */ - ut_asserteq(BIT(2), std->hunters_used); + /* USB is fourth in the list, so bit 3 */ + ut_asserteq(BIT(3), std->hunters_used); return 0; } @@ -270,7 +271,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt -l", 0)); ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); - ut_assert_skip_to_line("(total hunters: 3)"); + ut_assert_skip_to_line("(total hunters: 4)"); ut_assert_console_end(); /* Scan all hunters */ @@ -279,7 +280,9 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt", 0)); ut_assert_nextline("Hunting with: ethernet"); ut_assert_nextline("Hunting with: mmc"); - ut_assert_nextline("Hunting with: usb"); + ut_assert_nextline("Hunting with: scsi"); + ut_assert_nextline("scanning bus for devices..."); + ut_assert_skip_to_line("Hunting with: usb"); ut_assert_nextline( "Bus usb@1: scanning bus usb@1 for devices... 5 USB Device(s) found"); ut_assert_console_end(); @@ -290,12 +293,13 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextlinen("----"); ut_assert_nextline(" 50 * ethernet eth_bootdev"); ut_assert_nextline(" 10 * mmc mmc_bootdev"); + ut_assert_nextline(" 30 * scsi scsi_bootdev"); ut_assert_nextline(" 40 * usb usb_bootdev"); - ut_assert_nextline("(total hunters: 3)"); + ut_assert_nextline("(total hunters: 4)"); ut_assert_console_end(); - ut_asserteq(GENMASK(2, 0), std->hunters_used); + ut_asserteq(GENMASK(3, 0), std->hunters_used); return 0; } |