Files
erofs-freebsd-out-tree/tests/TC035-file-read-sequential.md
T
2026-08-13 10:44:59 +02:00

30 lines
749 B
Markdown

# Test Case: Sequential Regular-File Read
**Test ID**: TC035-file-read-sequential
## Objective
Verify buffered sequential reads return every byte of a deterministic
multi-block regular file.
## Fixture
Use `images/flat.erofs` and `source/flat/data.txt`. Evidence asserts
`FLAT_PLAIN`, NID, and size 262163.
## Procedure
```sh
stat -f 'size=%z blocks=%b' "$mnt/data.txt"
dd if="$mnt/data.txt" of=/tmp/tc035.out bs=4096
cmp /tmp/repo22-g1/source/flat/data.txt /tmp/tc035.out
sha256 /tmp/repo22-g1/source/flat/data.txt /tmp/tc035.out
```
Remove output, unmount, and detach.
## Expected Results
- `dd` reaches exact EOF and the complete output matches the source/hash.
- No short read, data corruption, dmesg error, or cleanup failure occurs.