Files
erofs-freebsd-out-tree/tests/TC030-flat-plain-large.md
T
2026-08-13 10:44:59 +02:00

918 B

Test Case: FLAT_PLAIN Large File

Test ID: TC030-flat-plain-large

Objective

Verify a greater-than-10-MiB contiguous FLAT_PLAIN file across thousands of filesystem blocks.

Fixture

Use images/flat.erofs and source/flat/large.bin. Evidence asserts layout 0 and size 10485791.

Procedure

stat -f 'size=%z blocks=%b' "$mnt/large.bin"
dd if="$mnt/large.bin" of=/tmp/tc030-full bs=1m
cmp /tmp/repo22-g1/source/flat/large.bin /tmp/tc030-full
sha256 /tmp/repo22-g1/source/flat/large.bin /tmp/tc030-full
./read_probe pread "$mnt/large.bin" 5242880 1048576 /tmp/tc030-seek
dd if=/tmp/repo22-g1/source/flat/large.bin of=/tmp/tc030-source-seek \
  bs=1m skip=5 count=1
cmp /tmp/tc030-source-seek /tmp/tc030-seek

Remove all outputs, unmount, and detach.

Expected Results

  • Reported size is exact; full and seeked data match the source.
  • No mapping error, panic, or cleanup failure occurs.