summaryrefslogtreecommitdiff
path: root/test/boot/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:22 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:17:10 -0400
commit2662b54d70fc04f070f0e4a9742d4b3197c9f3ea (patch)
tree6569dd30d4ddc4b0af0f4216b9e7bf3ba0a3c1d0 /test/boot/bootflow.c
parentbc06aa035d8f78a713a3d339d45f3d05ef0f0d67 (diff)
downloadu-boot-2662b54d70fc04f070f0e4a9742d4b3197c9f3ea.tar.gz
bootstd: Allow EFI bootmgr to support an invalid bootflow
For most testing we don't want this bootmeth to actually do anything. For the one test where we do, add a test hook to obtain the correct behaviour. This will allow us to bind the device always, rather than just doing it for this test. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/boot/bootflow.c')
-rw-r--r--test/boot/bootflow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index a2ed8ac774..22eef40c0e 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -11,6 +11,8 @@
#include <bootflow.h>
#include <bootstd.h>
#include <dm.h>
+#include <asm/test.h>
+#include <dm/device-internal.h>
#include <dm/lists.h>
#include <test/suites.h>
#include <test/ut.h>
@@ -328,6 +330,8 @@ static int bootflow_system(struct unit_test_state *uts)
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));
+ sandbox_set_fake_efi_mgr_dev(dev, true);
/* Add the system bootdev that it uses */
ut_assertok(device_bind_driver(bootstd, "system_bootdev",