]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: Add integration test for btrfs compression in repart 39597/head
authorChris Down <chris@chrisdown.name>
Thu, 6 Nov 2025 15:36:19 +0000 (23:36 +0800)
committerChris Down <chris@chrisdown.name>
Sun, 9 Nov 2025 13:14:22 +0000 (21:14 +0800)
commit2091caddb85a0816893ea5901e6d583f93d1d7f2
treeee0c542b10025599cd5cda386e4bb52d0263204f
parentf30a29245d8ff4509c95bef817944299efbc3795
test: Add integration test for btrfs compression in repart

Add testcase_btrfs_compression() to verify that btrfs partitions with
Compression= and CopyFiles= directives work correctly.

The test verifies the fix for issue #39584, where mkfs.btrfs would fail
with "ERROR: --compression must be used with --rootdir" when repart
tried to create compressed btrfs filesystems.

The test creates a partition definition with Format=btrfs,
Compression=zstd, and CopyFiles=, then validates:

1. systemd-repart output shows "Rootdir from:" and "Compress:",
   confirming that the --rootdir code path is used
2. mkfs.btrfs is invoked with both --compress and --rootdir options
3. The file is successfully copied to the filesystem
4. Compression is actually applied (verified via compsize output
   containing "zstd")
test/units/TEST-58-REPART.sh