mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] test: py: strategy: disable EFI when booting barebox
Date: Mon,  9 Feb 2026 13:38:16 +0100	[thread overview]
Message-ID: <20260209123817.2986892-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2026-02-09 12:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 12:38 Ahmad Fatoum [this message]
2026-02-10  9:07 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260209123817.2986892-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox