-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-118422: Fix run_fileexflags() test #118429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Don't test undefined fileno() behavior on a closed file, but use fstat() as a reliable test if the file was closed or not.
!buildbot wasi |
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 4cba722 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it LGTM if tests are passed on all platforms.
@serhiy-storchaka: I added _Py_IsValidFD() helper function to fix Windows. Do you want to review the updated PR? |
Oh, the test now fails on WASI with:
|
Initially the check was skipped only on WASI (#117982). Then I made it only performing on Linux/Windows/macOS (#118230), because it failed on Oracle Solaris, SmartOS and OpenBSD (#117982 (comment)). |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @vstinner, I could not cleanly backport this to
|
Don't test the undefined behavior of fileno() on a closed file, but use fstat() as a reliable test if the file was closed or not.
3.12 is now security-only, so the backport is no longer needed. https://discuss.python.org/t/python-3-12-is-now-security-fix-only/87520 |
Don't test undefined fileno() behavior on a closed file, but use fstat() as a reliable test if the file was closed or not.