Repository navigation
tests: isolate semantic worker Python processes (TEST-SEMANTIC-ISOLATED-WORKERS) - #863
Open
KernelSmoker wants to merge 1 commit into
Open
KernelSmoker wants to merge 1 commit into
KernelSmoker wants to merge 1 commit into
Conversation
qhukz13
reviewed
Nov 24, 2026
qhukz13
left a comment
Contributor
There was a problem hiding this comment.
Checked 1f76d4a as the author of tools/semantic_mutants.py (Linux, CPU only):
- Plain
-Iwould break the tool:python -I -m unittest <module>from the test's folder cannot import the module (-Idrops bothPYTHONPATHand the working directory). The bootstrap here puts exactly the test's folder andtests/semanticback onsys.path, so that is handled. tests/test_semantic_mutants.pyandtests/test_run_semantic_tests.py: OK.- A real run,
--lines 11766-11776 tests/semantic/test_alu_div_fixup_f32.py: 5 of 6 mutants caught, the same as before this change onmain;--op v_rcp_f64withtest_valu_rcp_f64.py(a file that sets up nosys.pathitself) lists its mutants fine. - Merges cleanly with #660 and #734, which touch the same file.
LGTM.
3 tasks done
3 of 4 tasks
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.
Claimed in the coordination issue as: TEST-SEMANTIC-ISOLATED-WORKERS — #14 (comment)
What and why
Run semantic test workers under Python isolated mode so host
PYTHONPATHand user site-packages cannot inject imports. The runner explicitly adds its suite directory before importing each module, and the mutant tester adds only its test directory and the semantic suite directory. Add poisoned-PYTHONPATHregressions for serial and parallel runner paths and for semantic mutation tests.Tested
python3 -I tests/test_run_semantic_tests.py: passed (20 tests; its intentional failing-fixture subprocess is expected).python3 -I tests/test_semantic_mutants.py: 13/13 passed.python3 -I scripts/run_semantic_tests.py tests/semantic -j 16in the Fedora 45 tool container (Python 3.15.2, SPIRV-Tools installed): 465 files, 6,108 tests, 0 failures.python3 -I -m py_compile scripts/run_semantic_tests.py tools/semantic_mutants.py tests/test_run_semantic_tests.py tests/test_semantic_mutants.py: passed.git diff --check: passed. Synthetic tests only; no game files.GPUs tested: n/a (CPU-only test tooling)
AI-assisted: yes