30 lines
766 B
Markdown
30 lines
766 B
Markdown
# 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.
|