Repository navigation
🐛 fix(test): dup2 a descriptor above 63 on GraalPy - #942
Merged
Merged
Conversation
GraalPy 25.4.4 has no fcntl.fcntl, so the test that duplicates a descriptor above 63 failed there. os.dup2 gives the same slot on every platform. The test first checks slot 100 is free, since dup2 would silently close a descriptor already holding it. The fcntl gate goes; the fd-directory gate stays, because descriptors_on needs a descriptor view to count with.
gaborbernat
force-pushed
the
fix/descriptor-test-dup2
branch
from
November 16, 2026 17:34
2b2e388 to
da0f029
Compare
This was referenced Nov 16, 2026
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.
The weekly GraalPy job failed on a test that duplicates a descriptor above 63, because the test called
fcntl.fcntl, which GraalPy 25.4.4 does not provide (itsfcntlmodule defines onlyflock,lockfandioctl; failing run). The case, added in #938, checks a descriptor past NetBSD's static/dev/fdnodes. The test now usesos.dup2, which places the duplicate on the same slot on every platform, so the case is checked on GraalPy too. The test now first requires descriptor 100 to be free, becauseos.dup2silently closes whatever holds it.🧪 filelock users see no difference.