summaryrefslogtreecommitdiff
path: root/test/boot/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:28 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:17:11 -0400
commitbd18b69de10d1a681e760f2ee65b3de29d3006fd (patch)
treed90704d507c4f99f18a6a72519c822ddeddf65f9 /test/boot/bootflow.c
parentc627cfc14c08a803f5aa9e39d841dcf990d8d034 (diff)
downloadu-boot-bd18b69de10d1a681e760f2ee65b3de29d3006fd.tar.gz
bootstd: Always create the EFI bootmgr bootmeth
Now that we can separate this out from the normal bootmeths, update the code to create it always. We cannot rely on the device tree to create this, since the EFI project is quite opposed to having anything in the device tree that helps U-Boot with its processing. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/boot/bootflow.c')
-rw-r--r--test/boot/bootflow.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index 07b0517718..b2f77972d1 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -324,34 +324,26 @@ BOOTSTD_TEST(bootflow_iter, UT_TESTF_DM | UT_TESTF_SCAN_FDT);
/* Check using the system bootdev */
static int bootflow_system(struct unit_test_state *uts)
{
- struct udevice *bootstd, *dev;
+ struct udevice *dev;
- /* Add the EFI bootmgr driver */
- ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd));
- ut_assertok(device_bind_driver(bootstd, "bootmeth_efi_mgr", "bootmgr",
- &dev));
- ut_assertok(device_probe(dev));
+ ut_assertok(uclass_get_device_by_name(UCLASS_BOOTMETH, "efi_mgr",
+ &dev));
sandbox_set_fake_efi_mgr_dev(dev, true);
- /* Add the system bootdev that it uses */
- ut_assertok(device_bind_driver(bootstd, "system_bootdev",
- "system-bootdev", &dev));
-
- ut_assertok(bootstd_test_drop_bootdev_order(uts));
-
/* We should get a single 'bootmgr' method right at the end */
bootstd_clear_glob();
console_record_reset_enable();
ut_assertok(run_command("bootflow scan -l", 0));
ut_assert_skip_to_line(
- " 0 bootmgr ready (none) 0 <NULL> <NULL>");
+ " 0 efi_mgr ready (none) 0 <NULL> <NULL>");
ut_assert_skip_to_line("No more bootdevs");
- ut_assert_skip_to_line("(2 bootflows, 2 valid)");
+ ut_assert_skip_to_line("(6 bootflows, 6 valid)");
ut_assert_console_end();
return 0;
}
-BOOTSTD_TEST(bootflow_system, UT_TESTF_DM | UT_TESTF_SCAN_FDT);
+BOOTSTD_TEST(bootflow_system, UT_TESTF_DM | UT_TESTF_SCAN_PDATA |
+ UT_TESTF_SCAN_FDT);
/* Check disabling a bootmethod if it requests it */
static int bootflow_iter_disable(struct unit_test_state *uts)