39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
# Test Case: Extended Inode File Above 4 GiB
|
|
|
|
**Test ID**: TC024-extended-inode-large
|
|
|
|
## Objective
|
|
|
|
Verify a 64-bit extended `i_size` above 4 GiB without materializing a multi-GiB
|
|
payload, using deterministic FLAT_PLAIN hole reads at distant offsets.
|
|
|
|
## Fixture
|
|
|
|
Use `images/extended-large-hole.erofs` and
|
|
`expected/large-hole-zero-64k.bin`. Structured evidence asserts a 64-byte
|
|
inode, size `4294971393`, layout 0, `startblk=0xffffffffffff`, valid CRC, and
|
|
an all-zero content descriptor.
|
|
|
|
## Procedure
|
|
|
|
After mounting, run three bounded reads:
|
|
|
|
```sh
|
|
stat -f 'size=%z blocks=%b mode=%p' "$mnt/huge-sparse.dat"
|
|
./read_probe pread "$mnt/huge-sparse.dat" 0 65536 /tmp/tc024-start
|
|
./read_probe pread "$mnt/huge-sparse.dat" 2147483648 65536 /tmp/tc024-middle
|
|
./read_probe pread "$mnt/huge-sparse.dat" 4294905857 65536 /tmp/tc024-end
|
|
cmp /tmp/repo22-g1/expected/large-hole-zero-64k.bin /tmp/tc024-start
|
|
cmp /tmp/repo22-g1/expected/large-hole-zero-64k.bin /tmp/tc024-middle
|
|
cmp /tmp/repo22-g1/expected/large-hole-zero-64k.bin /tmp/tc024-end
|
|
sha256 /tmp/tc024-start /tmp/tc024-middle /tmp/tc024-end
|
|
```
|
|
|
|
Remove outputs, unmount, and detach.
|
|
|
|
## Expected Results
|
|
|
|
- Size is exactly `4294971393`, not truncated to 32 bits.
|
|
- Start, middle, and final 64 KiB ranges match the deterministic zero source.
|
|
- Reads are bounded, no large allocation/panic occurs, and cleanup succeeds.
|