45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# Test Case: Cold Nested Namei and Corruption
|
|
|
|
**Test ID**: TC141-cold-nested-namei
|
|
**Category**: Directory Lookup
|
|
**Priority**: Critical
|
|
|
|
## Objective
|
|
|
|
Observe nested positive and missing lookup on fresh mounts, complete multi-
|
|
block cookies, Linux-compatible padding, and stable EINTEGRITY for three
|
|
structured directory corruptions.
|
|
|
|
## Procedure
|
|
|
|
On a fresh metadata/namei-base.erofs mount, make the first pathname operation:
|
|
|
|
./g3_vfs_probe expect-success open-read \
|
|
/tmp/repo22-g3/mnt/alpha/bravo/charlie/payload.txt
|
|
|
|
Compare the payload with the recorded source, require two direct missing
|
|
lookups to return errno 2, and run:
|
|
|
|
./readdir_probe /tmp/repo22-g3/mnt/wide 128
|
|
|
|
Repeat the cold positive read and cookie probe on
|
|
metadata/namei-padding-nonzero.erofs.
|
|
|
|
Finally mount each corruption independently and issue two direct stat calls:
|
|
|
|
| Image | Path | Expected errno |
|
|
|---|---|---:|
|
|
| namei-corrupt-short.erofs | /alpha | 97 |
|
|
| namei-corrupt-nameoff.erofs | /alpha | 97 |
|
|
| namei-corrupt-name.erofs | /wide/entry-077-abcdefghijklmnopqrstuvwxyz.txt | 97 |
|
|
|
|
Run readdir_probe on the affected directory and require its direct syscall
|
|
failure to report integrity failure. Unmount and detach between every image.
|
|
|
|
## Expected Results
|
|
|
|
Fresh positive lookup reads exact data; repeated missing lookup is ENOENT; both
|
|
valid variants report all 322 restartable entries. Every corruption remains
|
|
EINTEGRITY on both lookup attempts and readdir, without cache masking, panic,
|
|
or hang. Record all five image hashes and cleanup.
|