test(tools): stop the validation gate cleanup test from racing Python start-up #25962
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25962"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by zedekvdb on 2026-11-23T01:15:27Z.
What
test_command_cleanup_removes_descendant_after_parent_exit_and_timeout(ctestvulkan_validation_gate_commands) fails itstimeout=Truecase on slower Windows machines withassertTrue(ready.exists()).The case runs a Python parent that starts a Python child, and the child writes
ready.gate.rungets a 0.5 s timeout, so the job is killed 0.5 s after the parent starts. On an i7-8750H laptop, one Python start-up that starts a second one takes 0.82 to 1.10 s (5 runs), so the job is often killed before the child has writtenready.The child now sleeps until a deadline the test sets 4 s ahead, instead of for 1 s after its own start. The timeout is 3 s. The test waits for the deadline before checking for the marker. The kill then comes before the child's marker write however long the start-ups take, as long as they stay under 3 s. The
timeout=Falsecase uses the same deadline.Tested
Windows 11 Pro 10.0.26300, i7-8750H, Python 3.14.8, main
a182406ffa.python tools/tests/test_vulkan_validation_gate.py CommandTests:With
TerminateJobObjectremoved fromdrainintools/vulkan_validation_gate.py, both subtests fail atassertFalse(marker.exists()), so the test still detects a descendant that survives the job. The whole file (python tools/tests/test_vulkan_validation_gate.py) passes: 50 tests, OK.python tools/check_conventions.py --base origin/mainpasses. Not tested on Linux or macOS, whererunuseskillpginstead of a job. The change there is the same deadline.The test takes about 5 s longer: both subtests now wait for the 4 s deadline instead of 1.1 s.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T01:40:37Z.
Review: APPROVED
Reviewed — looks good
Nothing in the changed test logic blocks the PR; the test now gives the child a shared deadline and leaves time for the timeout path to terminate it.
What I ran
Reviewed head
88b485034b557268567f9f467652771a3e05f064. I readdescription.md,commits.md,manifest.json,diff.patch,review/README.md, all changed lines and relevant surrounding code intools/tests/test_vulkan_validation_gate.py, plus therunanddrainimplementations intools/vulkan_validation_gate.py. No tests or other commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
tools/tests/test_vulkan_validation_gate.pywas the only changed file and was read at the relevant lines; the rest of that 903-line file was not read.tools/vulkan_validation_gate.pywas read only aroundrunanddrain. The author reports passing Windows runs, the full test file, a negative control, and convention checks; these were not run in this review. Linux and macOS behavior was not tested.files.jsonwas not available through the review reader, so no separate excluded-file list was checked; the manifest lists one included changed file.To get this to a good state
Nothing is required.