33 lines
896 B
Markdown
33 lines
896 B
Markdown
# Test Case: Compact Inode Decoding
|
|
|
|
**Test ID**: TC020-compact-inode-basic
|
|
|
|
## Objective
|
|
|
|
Verify a real 32-byte compact regular inode exposes correct mode, link count,
|
|
size, allocation, and source-exact data.
|
|
|
|
## Fixture
|
|
|
|
Use `images/compact.erofs` and `source/compact/small.txt`. The evidence records
|
|
the NID and asserts `inode_size=32`.
|
|
|
|
## Procedure
|
|
|
|
After mounting on `$mnt`:
|
|
|
|
```sh
|
|
stat -f 'ino=%i size=%z mode=%p nlink=%l blocks=%b mtime=%m' "$mnt/small.txt"
|
|
wc -c /tmp/repo22-g1/source/compact/small.txt "$mnt/small.txt"
|
|
cmp /tmp/repo22-g1/source/compact/small.txt "$mnt/small.txt"
|
|
sha256 /tmp/repo22-g1/source/compact/small.txt "$mnt/small.txt"
|
|
```
|
|
|
|
Unmount and detach the exact md unit.
|
|
|
|
## Expected Results
|
|
|
|
- The inode is compact, regular mode `0644`, link count 1, timestamp 0, and
|
|
size equal to the source.
|
|
- Full content and hashes match; all operations and cleanup return zero.
|