Enable some FileHandle tests on Linux, FreeBSD, and OpenBSD.#1728
Merged
Conversation
be6aaa4 to
b4d5b07
Compare
Enables those tests that rely on `funopen()` on FreeBSD and OpenBSD, which have said function. Linux has `fopencookie()` which we could use in theory, except that it requires `_GNU_SOURCE` and is non-trivial to declare ourselves due to the use of a custom C structure also guarded by that macro.
b3b3ecc to
267c89c
Compare
FileHandle tests on FreeBSD and OpenBSD.FileHandle tests on Linux, FreeBSD, and OpenBSD.
…ft-declared C function
stmontgomery
approved these changes
May 26, 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.
Enables those tests that rely on
funopen()on FreeBSD and OpenBSD, which have said function.On Linux, we have
fopencookie()instead, but it's guarded by_GNU_SOURCEso it isn't always available (e.g. it builds for me on Ubuntu 24.04 but doesn't build in our CI). For the purposes of testing these code paths, I've hard-coded the declaration offopencookie()in our test target.Android theoretically has
funopen()and WASI theoretically hasfopencookie(), but neither is testable at the moment so I've left them out for now. Windows does not have an equivalent API.Checklist: