1.5 KiB
Test Case: Fragment-backed compressed metabox
Test ID: TC142-fragment-backed-compressed-metabox
Fixture: metabox-fragment.erofs and its four negative variants
Objective
Independently regress packed-carrier initialization before a fragment-backed metabox read and recursion/range rejection. Do not reuse TC140 guest results.
Layout qualification
g4_fixtures.py verify must prove a compressed metabox carrier, whole-file
fragment header with bit 63 set, fragment_offset + carrier_size <= packed_size,
ordinary metabox/packed NIDs, bit-63 synthetic inode NIDs, CRC-valid images,
and one-field mutations for self-loop, range, metabox recursion, and packed
recursion. Record source and all image SHA256 values.
Positive steps
unit=$(mdconfig -a -t vnode -f /tmp/repo22-g4/images/metabox-fragment.erofs)
mount -t erofs -o ro /dev/${unit} /mnt/repo22-g4
stat -f 'mode=%Sp size=%z inode=%i' /mnt/repo22-g4/metabox-a
sha256 -q /mnt/repo22-g4/metabox-a
lsextattr user /mnt/repo22-g4/metabox-a
getextattr -qq -x user shared-prefix-key /mnt/repo22-g4/metabox-a
getextattr -qq -x user item /mnt/repo22-g4/metabox-a
umount /mnt/repo22-g4
mdconfig -d -u "${unit#md}"
Negative steps
Trace-mount each of the four negative images in a fresh md cycle. Capture the
exact nmount errno/text, pre/post dmesg, vmstat -m, guest responsiveness,
and zero mount/md cleanup.
Expected results
Positive file SHA256 and values shared-value/value-000 match source. Every
negative returns EINTEGRITY (97), with no leak, hang, panic, trap, or residue.