Commit 8c3919a
committed
btrfs-progs: tests: add reproducibility check harness
Add tests/reproducibility-check.sh, a standalone root-required test that
checks mkfs.btrfs produces byte-identical images from identical inputs.
For a matrix of environment variations it runs mkfs twice and cmp's the
raw images:
- baseline, wall-clock time, TZ, locale, umask and working directory,
for both empty and --rootdir images;
- source uid, source filesystem (the same tree on loop-mounted ext4 vs
xfs), and compression (lzo/zlib/zstd), for --rootdir only.
Each run uses the documented recipe: a fixed -U, SOURCE_DATE_EPOCH and
DETERMINISTIC_SEED=1, and no --device-uuid, so the matrix also confirms
mkfs derives the device UUID from the fs UUID on its own. The source
tree is chown'd to 0:0 first (the one piece left to the caller) and mkfs
normalizes timestamps itself. The ext4 mount's lost+found is stripped so
the ext4 and xfs trees match, and two locales are probed at startup so
the locale case compares two real locales or is skipped.
Root is required for the ownership and loop-mounted source-filesystem
variations. With the preceding patches, all variations pass.
Signed-off-by: Leo Martins <loemra.dev@gmail.com>1 parent b57f04b commit 8c3919a
1 file changed
Lines changed: 411 additions & 0 deletions
0 commit comments