Skip to content

procfs: make the hidden-batch dirent test order independent - #338

Merged
congwang-mk merged 1 commit into
mainfrom
procfs-dirent-test-order
Oct 31, 2026
Merged

congwang-mk merged 1 commit into
mainfrom
procfs-dirent-test-order

Conversation

@congwang-mk

Copy link
Copy Markdown
Contributor

Fixes the red main CI run 1076 (5ce0c63).

ubuntu-latest moved from ubuntu-24.04 (run 1075, green) to ubuntu-26.04 (run 1076), and every ubuntu-26.04 job fails procfs::tests::test_read_filtered_dirents_skips_hidden_batches. The 22.04 and 24.04-arm jobs pass.

The test asserted that an unfiltered second read on the same fd returns nothing, which only holds when visible is the last entry the directory yields. If the filesystem lists a dot entry after it, the first read correctly stops at visible and the second returns what is left. The code is correct for either order; only the assertion was order dependent.

The second read now uses the same filter and asserts visible does not come back. Whichever order the filesystem uses, one of the two reads still has to skip hidden single-entry batches, so the test keeps its coverage.

Note: on 26.04 cargo test stopped at this lib failure, so the integration suite has not yet run on that image.

The test asserted that an unfiltered second read returns nothing, which
only holds when "visible" is the last entry the directory yields. It
passed on ubuntu-24.04 runners and fails on every ubuntu-26.04 job, where
"visible" evidently precedes a dot entry: the first read then correctly
stops at "visible" and the second returns what is left.
Re-read with the same filter instead: the kept entry must not come back,
and whichever order the filesystem uses, one of the two reads has to skip
hidden single-entry batches to get there.

Signed-off-by: Cong Wang <cwang@multikernel.io>
@congwang-mk
congwang-mk merged commit 95959ec into main Oct 31, 2026
25 checks passed
@congwang-mk
congwang-mk deleted the procfs-dirent-test-order branch October 31, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant