1.2 KiB
1.2 KiB
Test Case: VFS Vget Normal Operation
Test ID: TC012-vget-normal
Objective
Exercise VFS_VGET through a real FreeBSD file handle and verify the returned
vnode identifies and reads the same EROFS inode as pathname lookup.
Fixture
Use images/compact.erofs, source/compact/testfile.txt, and
tests/nfs_fh_tool.c. Compile the helper as described in
tests/G1-MANUAL-SETUP.md; run as root.
Procedure
After mounting on $mnt:
stat -f 'path_ino=%i gen=%v size=%z' "$mnt/testfile.txt"
./nfs_fh_tool capture "$mnt/testfile.txt" /tmp/tc012-a.fh
./nfs_fh_tool capture "$mnt/testfile.txt" /tmp/tc012-b.fh
./nfs_fh_tool compare /tmp/tc012-a.fh /tmp/tc012-b.fh
./nfs_fh_tool describe /tmp/tc012-a.fh
./nfs_fh_tool stat /tmp/tc012-a.fh
./nfs_fh_tool cat /tmp/tc012-a.fh /tmp/tc012-fh.out
cmp /tmp/repo22-g1/source/compact/testfile.txt /tmp/tc012-fh.out
sha256 /tmp/repo22-g1/source/compact/testfile.txt /tmp/tc012-fh.out
Remove the handles/output, then unmount and detach.
Expected Results
- Both captures produce the same handle.
- Handle NID,
fhstatinode, and pathname inode agree. fhopenoutput matches the deterministic source exactly.- No stale/duplicate vnode error or cleanup failure occurs.