test: Convert tests to use FsHelper and DiskHelper
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | test: Add a helper class to create disk imagestest/ | +92 | 0 replies | |
| 2/14 | test: fs_helper: Skip empty srcdir when creating a filesystemtest/ | +2 | 0 replies | |
| 3/14 | test: Fix broken fs_obj_fat fixturetest/ | +1 | 0 replies | |
| 4/14 | test: Convert test_cat to use FsHelpertest/ | +7 | 0 replies | |
| 5/14 | test: Convert test_xxd to use FsHelpertest/ | +7 | 0 replies | |
| 6/14 | test: Convert test_efi_bootmgr to use FsHelpertest/ | +14 | 0 replies | |
| 7/14 | test: Convert setup_bootmenu_image() to use FsHelpertest/ | +9 | 0 replies | |
| 8/14 | test: Split out core of Fedora image into a new functiontest/ | +47 | 0 replies | |
| 9/14 | test: Convert setup_bootflow_image() to use FsHelpertest/ | +19 | 0 replies | |
| 10/14 | test: Convert setup_efi_image() to use FsHelpertest/ | +11 | 0 replies | |
| 11/14 | test: Convert test_ut_dm_init() to use FsHelpertest/ | +2 | 0 replies | |
| 12/14 | test: Rename setup_bootflow_image()test/ | +2 | 0 replies | |
| 13/14 | test: Convert setup_rauc_image() to use FsHelpertest/ | +18 | 0 replies | |
| 14/14 | test: Convert test_fs fixtures to use FsHelpertest/ | +64 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/14] test: Convert tests to use FsHelper and DiskHelper
This series adds a DiskHelper class and converts most test code to use FsHelper and DiskHelper instead of calling mk_fs() and setup_image() directly.
The FsHelper class (already upstream) provides a cleaner interface for creating filesystem images, handling temporary directories and cleanup automatically. The new DiskHelper class builds on this, creating partitioned disk images from one or more FsHelper filesystems.
DiskHelper includes a cur_dir flag to place the disk image in the current directory rather than the persistent-data directory. This matches the behaviour of setup_image() which places disk images in source_dir where sandbox expects to find them. This flag is needed for now and should be removed in a follow-up once all tests are migrated to use the persistent-data directory instead.
With these helpers, test-setup code becomes shorter, more consistent and easier to follow. Manual sfdisk/dd/cleanup sequences are replaced by a few method calls.
The series also fixes a broken fs_obj_fat fixture where a stale size_gran argument is silently causing the test to be skipped.
A few EFI test fixtures (efi_capsule, efi_secboot, eficonfig) still use mk_fs() directly; these are left for a follow-up series since they would benefit from a full DiskHelper conversion.
Simon Glass (14):
test: Add a helper class to create disk images
test: fs_helper: Skip empty srcdir when creating a filesystem
test: Fix broken fs_obj_fat fixture
test: Convert test_cat to use FsHelper
test: Convert test_xxd to use FsHelper
test: Convert test_efi_bootmgr to use FsHelper
test: Convert setup_bootmenu_image() to use FsHelper
test: Split out core of Fedora image into a new function
test: Convert setup_bootflow_image() to use FsHelper
test: Convert setup_efi_image() to use FsHelper
test: Convert test_ut_dm_init() to use FsHelper
test: Rename setup_bootflow_image()
test: Convert setup_rauc_image() to use FsHelper
test: Convert test_fs fixtures to use FsHelper
test/py/tests/fs_helper.py | 95 +++++++++++++- test/py/tests/test_cat.py | 27 ++-- test/py/tests/test_efi_bootmgr.py | 38 +++--- test/py/tests/test_fs/conftest.py | 198 ++++++++++-------------------- test/py/tests/test_ut.py | 190 +++++++++++++++------------- test/py/tests/test_xxd.py | 28 ++--- 6 files changed, 288 insertions(+), 288 deletions(-)
Signature · 4 lines
2.43.0 base-commit: 1c1bfb1cf34bbb2a5717eb6995c55093279f9341 branch: testfsa