]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
test/py: Fix race conditions on EFI capsule tests
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 7 Aug 2025 08:08:16 +0000 (11:08 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 18 Aug 2025 22:42:04 +0000 (16:42 -0600)
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@linaro.org>
test/py/tests/test_efi_capsule/conftest.py

index 961d2e0b3c1967d1db4f288eab05063e0797c225..45c06c42fd2edd0fbafafb052419c3c4e3b4d243 100644 (file)
@@ -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)