gh-152548: Convert test_eintr to the test.support.isolation.runInSubprocess() decorator - #152570
Open
serhiy-storchaka wants to merge 2 commits into
Open
gh-152548: Convert test_eintr to the test.support.isolation.runInSubprocess() decorator#152570serhiy-storchaka wants to merge 2 commits into
serhiy-storchaka wants to merge 2 commits into
Conversation
Member
Author
|
@vstinner, please look at this. It produces much better report. |
Documentation build overview
18 files changed ·
|
serhiy-storchaka
force-pushed
the
test-eintr-isolated
branch
from
June 29, 2026 22:35
4d0f9ab to
09ef4ee
Compare
The EINTR tests need a process with no background thread so signals reach the main thread; they were driven as a script via run_test_script. With @isolation.runInSubprocess() each test class runs in its own fresh subprocess and the tests are reported individually instead of as one opaque test_all. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
test_eintr.py was renamed from the never-collected _test_eintr.py, so its top-level "import fcntl" now runs on every platform and crashed the module import on Windows and WASI. Import fcntl through import_helper so the whole module is skipped there instead, as the EINTR tests only run on Unix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka
force-pushed
the
test-eintr-isolated
branch
from
July 27, 2026 19:14
e77715e to
b75178d
Compare
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 EINTR tests need a process with no background thread so that signals are delivered to the main thread. They were driven as a script in a child process (
_test_eintr.pyrun viascript_helper.run_test_script()), reported to the runner as a single opaquetest_all.With
@isolation.runInSubprocess()each test class runs in its own fresh subprocess, so the individual EINTR tests are collected and reported (with real tracebacks) directly undertest_eintr. The test code itself is unchanged;_test_eintr.pyis renamed totest_eintr.py(the per-class@runInSubprocess()/@requires_resource('walltime')decorators are the only additions), and the thin wrapper is removed.