Repository navigation
🐛 fix(test): reject static /dev/fd listings - #938
Merged
Merged
Conversation
NetBSD without fdescfs keeps static /dev/fd/0..63 nodes, so the complete-fd-directory probe saw its own descriptor listed and trusted the view. descriptors_on then missed every descriptor numbered 64 and up, and the inode-reuse stand-in faked a reuse while a descriptor was still open. The probe now also requires its entry to disappear once the descriptor is closed. Tests cover a static view, a missing view, and a descriptor duplicated above 63. Fixes #934 Fixes #917
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.
Packagers who run the test suite on NetBSD without fdescfs saw a new failure in release 4.2.10 (#934). Without fdescfs, NetBSD keeps static
/dev/fd/0to/dev/fd/63device nodes (MAKEDEV, mount_fdesc(8)), which the suite took for a complete view of open descriptors, so it miscounted descriptors and simulated an inode reuse while a descriptor was still open.The check that decides whether the suite can see every open descriptor now also requires a closed descriptor to vanish from the listing, so a static view no longer passes. A static node stays listed after its descriptor closes, which is why the closed-probe test rejects it. 🧪 Library behavior does not change, because only the test suite and that check are touched.
Fixes #934