Files
erofs-freebsd-out-tree/tests/TC136-metabox-truncated-super-extension.md
T
2026-08-18 09:20:44 +02:00

771 B

Test Case: Truncated metabox super extension

Test ID: TC136-metabox-truncated-super-extension Fixtures: bad-metabox-truncated-extension.erofs, bad-ishare-prefix-id.erofs

Objective

Reject METABOX when sb_extslots=0 leaves metabox_nid undeclared, and reject ISHARE_XATTRS when its prefix ID equals xattr_prefix_count.

Manual steps

For each image, attach it and trace the read-only mount:

truss -f -o /tmp/tc136.truss mount -t erofs -o ro \
  /dev/${unit} /mnt/repo22-g4
grep nmount /tmp/tc136.truss
mount | grep repo22-g4 || true
mdconfig -d -u "${unit#md}"

Expected results

Both nmount calls return EINTEGRITY (97). The extension bytes are not consumed, no mount appears, and detach succeeds without a vnode/md leak.