gh-152548: Convert the test_signal wakeup tests to @runInSubprocess() - #152639
Open
serhiy-storchaka wants to merge 1 commit into
Open
gh-152548: Convert the test_signal wakeup tests to @runInSubprocess()#152639serhiy-storchaka wants to merge 1 commit into
serhiy-storchaka wants to merge 1 commit into
Conversation
Documentation build overview
|
…cess()
WakeupSignalTests and WakeupSocketSignalTests ran each test as a script
string via assert_python_ok('-c', ...), using a subprocess to have a
single thread for signal delivery. Decorate them with @runInSubprocess()
instead, so the same code runs as a normal method body using self.assert*.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka
force-pushed
the
test-signal-isolated
branch
from
July 27, 2026 19:14
cb4fa6a to
37bc54a
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 wakeup tests in
WakeupSignalTestsandWakeupSocketSignalTestsneed a process with no background thread so that signals are delivered to the main thread. Each was driven as a hand-written script string run in a child process viaassert_python_ok('-c', ...), signalling failures with bareraiseand reported to the runner only through the child exit code.With
@isolation.runInSubprocess()the same code runs as a normal method body in a fresh subprocess, usingself.assert*and reported per test, with the subprocess traceback shown as the cause of a failure. Thecheck_wakeup()helper becomes an ordinary helper that runs atest(read)callback in-process and asserts the read-back; the_testcapiskips move to the parent process (so no subprocess is spawned when skipped).