[PATCH 00/10] test: Convert remaining mk_fs() callers and tidy fs_helper
Simon Glass
sjg at chromium.org
Wed May 6 17:56:14 CEST 2026
Convert the three test fixtures that still use the procedural
fs_helper.mk_fs() / setup_image() entry points to use FsHelper and
DiskHelper as context managers, matching test_efi_bootmgr()
With those gone, drop setup_image() and inline the module-level mk_fs()
into FsHelper.mk_fs()
A handful of small cleanups follow:
- extend mkfs -d to all ext variants and pass it unconditionally
- move /sbin PATH fix and pre-existing-image cleanup into __init__()
- drop a dead size-rounding step and the try/except wrapper
- use Python's file.truncate() instead of shell
- let callers override fsh.fs_img if they wish
This paves the way to move generated test images out of the source tree.
Simon Glass (10):
test: Convert test_eficonfig to FsHelper
test: Convert test_efi_secboot fixtures to FsHelper
test: Convert test_efi_capsule fixture to FsHelper
test: Drop unused setup_image() helper
test: Inline mk_fs() into FsHelper.mk_fs()
test: Factor mkfs args into _get_fs_args() helper
test: Pass mkfs -d unconditionally for ext filesystems
test: Tidy up the mk_fs() logic a little
test: Use Python truncate() for image file
test: Set the default fs_img in the constructor
test/py/tests/fs_helper.py | 196 ++++------
test/py/tests/test_efi_capsule/conftest.py | 156 ++++----
test/py/tests/test_efi_secboot/conftest.py | 402 ++++++++++-----------
test/py/tests/test_eficonfig.py | 46 ++-
4 files changed, 375 insertions(+), 425 deletions(-)
---
base-commit: ae8987f4e690f397f507c4b1efabd68b3ed08db6
branch: testb-us
--
2.43.0
More information about the U-Boot
mailing list