Files
erofs-freebsd-out-tree/tests/TC053-vfs-hash-integration.md
T
2026-08-18 09:20:44 +02:00

1.0 KiB

Test Case: Stable Vnode Identity Behavior

Test ID: TC053-vfs-hash-integration Category: VFS Integration Priority: High

Objective

Verify repeated resolutions of one EROFS NID expose one stable vnode identity and file handle within a mount. This is behavior-level coverage of the vfs_hash contract; it does not directly observe the internal hash bucket.

Procedure

Mount vfs/vfs-plain.erofs and run:

stat -f 'ino=%i gen=%v size=%z' \
  /tmp/repo22-g3/mnt/testdir/file.txt > TC053-a.txt
stat -f 'ino=%i gen=%v size=%z' \
  /tmp/repo22-g3/mnt/testdir/./file.txt > TC053-b.txt
cmp TC053-a.txt TC053-b.txt
./nfs_fh_tool capture /tmp/repo22-g3/mnt/testdir/file.txt TC053-a.fh
./nfs_fh_tool capture /tmp/repo22-g3/mnt/testdir/./file.txt TC053-b.fh
./nfs_fh_tool compare TC053-a.fh TC053-b.fh
./nfs_fh_tool describe TC053-a.fh

Expected Results

Metadata and handles are identical and the handle NID/generation matches stat. Record this observable identity behavior, handle hash, and cleanup.