Files
erofs-freebsd-out-tree/tests/TC009-statfs-basic.md
T
2026-08-13 10:44:59 +02:00

1.1 KiB

Test Case: Basic statfs Information

Test ID: TC009-statfs-basic

Objective

Verify FreeBSD statfs(2) fields against the qualified image superblock.

Fixture

Use images/compact.erofs. Before transfer, record dump.erofs -s and the compact superblock row in fixture-evidence.txt. Follow tests/G1-MANUAL-SETUP.md and compile tests/statfs_probe.c in the guest.

Procedure

Host qualification:

dump.erofs -s /work/build/repo22-g1/images/compact.erofs
python3 tests/erofs_fixture.py inspect /work/build/repo22-g1/images/compact.erofs

Guest dynamic check after mounting the image on $mnt:

./statfs_probe "$mnt"
df -kT "$mnt"
df -iT "$mnt"
mount -p | awk -v p="$mnt" '$2 == p'

Unmount and detach the exact dynamic md unit.

Expected Results

  • fstype=erofs, bsize=4096, iosize=4096, and readonly=1.
  • blocks and files equal the image's declared block and inode counts.
  • bfree, bavail, and ffree are zero; df conversions agree.
  • mount -p contains ro; cleanup succeeds.

stat -f is not a statfs(2) probe and must not be substituted.