1.1 KiB
1.1 KiB
Test Case: Large Regular-File Read
Test ID: TC037-file-read-large
Objective
Verify complete and distant-range reads of a deterministic file larger than 100 MiB without a correctness shortcut based only on throughput.
Fixture
Use images/flat.erofs, source/flat/huge-data.bin, and
expected/huge-sample.bin. Evidence asserts layout 0 and size 104857857.
Procedure
stat -f 'size=%z blocks=%b' "$mnt/huge-data.bin"
time dd if="$mnt/huge-data.bin" of=/tmp/tc037-full bs=1m
cmp /tmp/repo22-g1/source/flat/huge-data.bin /tmp/tc037-full
sha256 /tmp/repo22-g1/source/flat/huge-data.bin /tmp/tc037-full
./read_probe pread "$mnt/huge-data.bin" 52428800 5242880 /tmp/tc037-sample
cmp /tmp/repo22-g1/expected/huge-sample.bin /tmp/tc037-sample
sha256 /tmp/repo22-g1/expected/huge-sample.bin /tmp/tc037-sample
Remove outputs, unmount, and detach.
Expected Results
- Exact size, full compare, and 50 MiB-offset sample compare all pass.
- Record elapsed time but impose no host-dependent QEMU throughput threshold.
- No memory exhaustion, panic, or cleanup failure occurs.