Repository navigation
procfs: make the hidden-batch dirent test order independent - #338
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the red
mainCI run 1076 (5ce0c63).ubuntu-latestmoved from ubuntu-24.04 (run 1075, green) to ubuntu-26.04 (run 1076), and every ubuntu-26.04 job failsprocfs::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
visibleis the last entry the directory yields. If the filesystem lists a dot entry after it, the first read correctly stops atvisibleand 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
visibledoes 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 teststopped at this lib failure, so the integration suite has not yet run on that image.