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

829 B

Test Case: Readdir - Multi-Block Completeness

Test ID: TC047-readdir-large Category: Directory Operations Priority: High

Objective

Verify repeated small-buffer reads cover a 320-file multi-block directory exactly once.

Procedure

Mount metadata/namei-base.erofs and run:

./readdir_probe /tmp/repo22-g3/mnt/wide 128
find /tmp/repo22-g3/mnt/wide -maxdepth 1 -type f |
  sed 's#.*/##' | sort > actual-wide.txt
test "$(wc -l < actual-wide.txt)" -eq 320
test "$(sort actual-wide.txt | uniq -d | wc -l)" -eq 0

Compare actual-wide.txt with fixtures/metadata/expected-wide.txt.

Expected Results

The helper reports 322 unique entries and 322 valid restart positions with a 128-byte userspace buffer; the exact manifest has 320 names and no duplicates. Record the probe hash and cleanup.