test code v1

This commit is contained in:
2026-08-13 10:44:59 +02:00
commit f3b1165f19
301 changed files with 37885 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# 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.