]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: convert fallocate to use subtests
authorKarel Zak <kzak@redhat.com>
Thu, 11 Dec 2025 12:42:02 +0000 (13:42 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Dec 2025 12:42:02 +0000 (13:42 +0100)
commit4d5f4bb9230be43fb17d6ff1e95df2a498eaed23
tree56d211d6aae8053be2b690a96bf25da839f18bf7
parent3d214e7b1ced645b7092bb1aa999fead029fd312
tests: convert fallocate to use subtests

Convert the fallocate test to use subtests pattern following the
waitpid test example. This allows testing multiple scenarios in a
single test run.

Subtests:
- alloc: Basic allocation test (original test)
- report-data-holes: Report holes before digging (data holes)
- dig-holes: Convert data holes to sparse holes with verbose output
- report-file-holes: Report holes after digging (file holes)

The test reuses the same image file across dig/report subtests to
efficiently test the complete workflow: report → dig → report.

Uses <testfile> placeholder instead of absolute paths in expected
output to ensure tests work from any directory.

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/misc/fallocate-alloc [moved from tests/expected/misc/fallocate with 100% similarity]
tests/expected/misc/fallocate-dig-holes [new file with mode: 0644]
tests/expected/misc/fallocate-report-data-holes [new file with mode: 0644]
tests/expected/misc/fallocate-report-file-holes [new file with mode: 0644]
tests/ts/misc/fallocate