test code v1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Test Case: Directory Entry Decoding - Normal
|
||||
|
||||
**Test ID**: TC041-dirent-decode-normal
|
||||
**Category**: Directory Operations
|
||||
**Priority**: High
|
||||
|
||||
## Objective
|
||||
|
||||
Decode every entry type and the 255-byte filename from the deterministic VFS
|
||||
fixture through FreeBSD getdirentries(2), not inferred ls formatting.
|
||||
|
||||
## Procedure
|
||||
|
||||
Mount vfs/vfs-plain.erofs using G3-MANUAL-SETUP.md, then run:
|
||||
|
||||
./readdir_probe /tmp/repo22-g3/mnt/testdir 512
|
||||
find /tmp/repo22-g3/mnt/testdir -maxdepth 1 -print |
|
||||
sed 's#.*/##' | sort > actual-testdir.txt
|
||||
cmp fixtures/vfs/expected-testdir.txt actual-testdir.txt
|
||||
name=$(find /tmp/repo22-g3/mnt/testdir -maxdepth 1 -type f \
|
||||
-name 'long-*')
|
||||
test "$(basename "$name" | tr -d '\n' | wc -c)" -eq 255
|
||||
|
||||
## Expected Results
|
||||
|
||||
The probe reports 36 unique entries, correct DT_DIR/DT_REG/DT_LNK counts,
|
||||
strictly increasing restartable cookies, and one deterministic name/type hash.
|
||||
The 34 real names match the manifest exactly and the longest name is 255 bytes.
|
||||
Record probe output, manifest/image hashes, and mount/md cleanup.
|
||||
Reference in New Issue
Block a user