mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] test: py: strategy: disable EFI when booting barebox
@ 2026-02-09 12:38 Ahmad Fatoum
  2026-02-10  9:07 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-09 12:38 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The existing FIT tests should boot barebox normally without EFI,
even if given an EFI stubbed barebox.

Adapt boot_barebox to enforce this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 test/py/test_fit.py | 17 +++++++++++++----
 test/strategy.py    |  1 +
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/test/py/test_fit.py b/test/py/test_fit.py
index 0f8fffee3361..8bcee6a75f23 100644
--- a/test/py/test_fit.py
+++ b/test/py/test_fit.py
@@ -73,10 +73,19 @@ def test_fit_dryrun(barebox, strategy, fitimage):
     barebox.run_check("global dryrun_attempts=5")
     barebox.run_check('[ "$global.dryrun_attempts" = 5 ]')
 
-    for i in range(5):
-        stdout, _, _ = barebox.run(f"bootm -d -v {fitimage}")
-        errors = filter_errors(stdout)
-        assert errors == [], errors
+    [efi] = barebox.run_check("echo ${global.bootm.efi}")
+
+    try:
+        if efi:
+            barebox.run_check("global.bootm.efi=disabled")
+
+        for i in range(5):
+            stdout, _, _ = barebox.run(f"bootm -d -v {fitimage}")
+            errors = filter_errors(stdout)
+            assert errors == [], errors
+    finally:
+        if efi:
+            barebox.run_check(f"global.bootm.efi={efi}")
 
     # If we actually did boot, this variable would be undefined
     barebox.run_check('[ "$global.dryrun_attempts" = 5 ]')
diff --git a/test/strategy.py b/test/strategy.py
index c04d38c180a7..35cda3aca498 100644
--- a/test/strategy.py
+++ b/test/strategy.py
@@ -99,6 +99,7 @@ class BareboxTestStrategy(Strategy):
         self.transition(Status.barebox)
 
         try:
+            self.barebox.run("global.bootm.efi=disabled # if it exists")
             if bootm:
                 self.barebox_bootm(boottarget)
             else:
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-10  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09 12:38 [PATCH] test: py: strategy: disable EFI when booting barebox Ahmad Fatoum
2026-02-10  9:07 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox