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
+29
View File
@@ -0,0 +1,29 @@
# Test Case: FLAT_INLINE Zero-Length File
**Test ID**: TC032-flat-inline-zero
## Objective
Verify an explicitly layout-2 zero-length compact inode returns clean EOF and
zero allocation.
## Fixture
Use `images/inline-zero.erofs` and `source/inline/empty.txt`. The transformer
asserts compact `FLAT_INLINE`, size 0, valid CRC, and records the image/source
hashes.
## Procedure
```sh
stat -f 'size=%z blocks=%b mode=%p' "$mnt/empty.txt"
cmp /tmp/repo22-g1/source/inline/empty.txt "$mnt/empty.txt"
test "$(wc -c < "$mnt/empty.txt")" -eq 0
sha256 /tmp/repo22-g1/source/inline/empty.txt "$mnt/empty.txt"
```
## Expected Results
- Size and byte count are zero, `st_blocks=0`, hashes match the empty source,
and no read error occurs.
- Mount and cleanup succeed.