[PATCH 3/4] test/py: Fix race conditions on EFI capsule tests

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Aug 7 10:08:16 CEST 2025


efi_capsule_data() is called in each of the EFI tests to create and
setup the files we need. However, it also recreates the spi.bin file
that holds the SPI flash contents we rely on for the test validation.

This leads to weird errors since reading from the flash returns 0,
instead of the expected value if the file has been recreated.

Always restart our sandbox instance if the files are recreated.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
 test/py/tests/test_efi_capsule/conftest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index 961d2e0b3c19..45c06c42fd2e 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -103,6 +103,7 @@ def efi_capsule_data(request, ubman):
         pytest.skip('Setup failed: %s' % exception.cmd)
         return
     else:
+        ubman.restart_uboot()
         yield image_path
     finally:
         call('rm -rf %s' % mnt_point, shell=True)
-- 
2.49.0



More information about the U-Boot mailing list