summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 20:47:46 +0300
committerTom Rini <trini@konsulko.com>2023-01-24 02:11:40 +0300
commit0d77f8f1ca870f7ecd710e701d46c565ff72c68b (patch)
tree1ba45f5d33b22d72fc4698eadef054f951117573 /test
parent8f090b67d07461cb8313ab08a4d6f44ea9902cf7 (diff)
downloadu-boot-0d77f8f1ca870f7ecd710e701d46c565ff72c68b.tar.xz
bootstd: Add an IDE bootdev
Add a bootdev for IDE 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.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 5661a3c000..a3acdcbdba 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -239,10 +239,11 @@ static int bootdev_test_hunter(struct unit_test_state *uts)
ut_assert_nextline("Prio Used Uclass Hunter");
ut_assert_nextlinen("----");
ut_assert_nextline(" 50 ethernet eth_bootdev");
+ ut_assert_nextline(" 40 ide ide_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: 4)");
+ ut_assert_nextline("(total hunters: 5)");
ut_assert_console_end();
ut_assertok(bootdev_hunt("usb1", false));
@@ -250,8 +251,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 fourth in the list, so bit 3 */
- ut_asserteq(BIT(3), std->hunters_used);
+ /* USB is fifth in the list, so bit 4 */
+ ut_asserteq(BIT(4), std->hunters_used);
return 0;
}
@@ -271,7 +272,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: 4)");
+ ut_assert_skip_to_line("(total hunters: 5)");
ut_assert_console_end();
/* Scan all hunters */
@@ -279,6 +280,8 @@ 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: ide");
+ ut_assert_nextline("Bus 0: not available ");
ut_assert_nextline("Hunting with: mmc");
ut_assert_nextline("Hunting with: scsi");
ut_assert_nextline("scanning bus for devices...");
@@ -292,14 +295,15 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts)
ut_assert_nextlinen("Prio");
ut_assert_nextlinen("----");
ut_assert_nextline(" 50 * ethernet eth_bootdev");
+ ut_assert_nextline(" 40 * ide ide_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: 4)");
+ ut_assert_nextline("(total hunters: 5)");
ut_assert_console_end();
- ut_asserteq(GENMASK(3, 0), std->hunters_used);
+ ut_asserteq(GENMASK(4, 0), std->hunters_used);
return 0;
}