Repository navigation
Cancel Windows semantic test subprocess trees (SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL) - #2071
Conversation
MSedgeMC
left a comment
There was a problem hiding this comment.
Verified on the PR branch: python3 -m unittest tests.test_run_semantic_tests -> 27 tests OK (1 skipped — the new Windows descendant-kill test is guarded by @skipUnless(os.name=='nt'), which cannot execute on this Linux host). The fix is sound: on Windows, taskkill /F /T needs the root alive, so it no longer pre-terminates processes with p.terminate(), and _kill_process_tree is skipped when the root has already exited; POSIX termination behaviour is unchanged. Advisory: branch carries ~60 older commits not on current main; rebase before merge.
|
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
(AI-assisted test run; output checked by hand.) |
|
Merged into Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (c503337). AI-assisted (Claude Code), posted for DadaCap. |
Claimed in the coordination issue as: SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL
What and why
After #1936, interrupt cleanup terminates the parent before running Windows
taskkill /T. With the parent gone, the child can continue running and keep the runner's output pipe open. Ask Windows to end the process tree while the parent is live, then fall back to killing the parent through its process handle. The Windows regression starts a synthetic descendant that inherits stdout and checks whether it survives cancellation.Tested
e48ff03the descendant lived long enough to write its completion marker to the pipe. With the fix the regression passed.py -3.14 -I tests/test_run_semantic_tests.pyran 27 cases successfully with the POSIX signal case skipped.test_library_compute_forms.pypassed (12 tests).git diff --checkand the source-only check.GPUs tested: n/a.
AI-assisted: yes.
main.