[PATCH 3/3] test: py: linux: remove test_ prefix for intermediate functions

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Feb 13 02:35:58 PST 2026


From: Ahmad Fatoum <a.fatoum at barebox.org>

These functions are not standalone tests, but they are called from
actual tests, so rename them to prevent pytest from collecting them.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 test/py/test_linux_efiloader.py | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/test/py/test_linux_efiloader.py b/test/py/test_linux_efiloader.py
index df50f21bffc0..a76e55a91e52 100644
--- a/test/py/test_linux_efiloader.py
+++ b/test/py/test_linux_efiloader.py
@@ -72,10 +72,10 @@ def test_boot_manual_with_initrd(strategy, barebox, env, efiloader, debian_iso):
                                    "\n".join(dmesg)) is not None
 
         if efiloader:
-            test_efi_kernel_no_warn(shell)
-            test_expected_efi_messages(shell, env)
-            test_efi_systab(shell, env)
-            test_efivars_filesystem_not_empty(shell)
+            check_efi_kernel_no_warn(shell)
+            check_expected_efi_messages(shell, env)
+            check_efi_systab(shell, env)
+            check_efivars_filesystem_not_empty(shell)
 
             assert not uefi_not_found, \
                    "EFI stub was not used despite global.bootm.efi=required"
@@ -85,15 +85,13 @@ def test_boot_manual_with_initrd(strategy, barebox, env, efiloader, debian_iso):
                    "EFI stub was used despite global.bootm.efi=disabled"
 
 
- at pytest.mark.lg_feature(['bootable', 'efi'])
-def test_efi_kernel_no_warn(shell):
-    stdout, stderr, ret = shell.run("dmesg -r | grep '<[0-4]>.*\\<efi\\>'")
+def check_efi_kernel_no_warn(shell):
+    stdout, stderr, _ = shell.run("dmesg -r | grep '<[0-4]>.*\\<efi\\>'")
     assert stdout == []
     assert stderr == []
 
 
- at pytest.mark.lg_feature(['bootable', 'efi'])
-def test_expected_efi_messages(shell, env):
+def check_expected_efi_messages(shell, env):
     dmesg = get_dmesg(shell, 'efi')
 
     expected_patterns = [
@@ -106,8 +104,7 @@ def test_expected_efi_messages(shell, env):
                f"Missing expected EFI message: {pattern}"
 
 
- at pytest.mark.lg_feature(['bootable', 'efi'])
-def test_efi_systab(shell, env):
+def check_efi_systab(shell, env):
     stdout, stderr, ret = shell.run("cat /sys/firmware/efi/systab")
     assert ret == 0
     assert stderr == []
@@ -124,9 +121,7 @@ def test_efi_systab(shell, env):
                f"Missing expected entry in systab : {pattern}"
 
 
- at pytest.mark.lg_feature(['bootable', 'efi'])
-def test_efivars_filesystem_not_empty(shell):
-    # Directory must not be empty
+def check_efivars_filesystem_not_empty(shell):
     shell.run("mount -t efivarfs efivarfs /sys/firmware/efi/efivars")
     stdout, _, ret = shell.run("ls -1 /sys/firmware/efi/efivars")
     assert ret == 0
-- 
2.47.3




More information about the barebox mailing list