mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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")