[PR #863] tests: isolate semantic worker Python processes (TEST-SEMANTIC-ISOLATED-WORKERS) #902

Open
opened 2026-11-26 20:19:26 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/863
Author: @KernelSmoker
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: kernelsmoker/test-semantic-isolated-workers


📝 Commits (1)

  • 1f76d4a tests: isolate semantic worker Python processes

📊 Changes

4 files changed (+59 additions, -13 deletions)

View changed files

📝 scripts/run_semantic_tests.py (+9 -5)
📝 tests/test_run_semantic_tests.py (+21 -2)
📝 tests/test_semantic_mutants.py (+20 -0)
📝 tools/semantic_mutants.py (+9 -6)

📄 Description

Claimed in the coordination issue as: TEST-SEMANTIC-ISOLATED-WORKERS — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134674247

What and why

Run semantic test workers under Python isolated mode so host PYTHONPATH and 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-PYTHONPATH regressions 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 16 in 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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/863 **Author:** [@KernelSmoker](https://github.com/KernelSmoker) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `kernelsmoker/test-semantic-isolated-workers` --- ### 📝 Commits (1) - [`1f76d4a`](https://github.com/ubiquitarianism/leonida/commit/1f76d4a794b7086e6efe1b379ba80237fd1c59f7) tests: isolate semantic worker Python processes ### 📊 Changes **4 files changed** (+59 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `scripts/run_semantic_tests.py` (+9 -5) 📝 `tests/test_run_semantic_tests.py` (+21 -2) 📝 `tests/test_semantic_mutants.py` (+20 -0) 📝 `tools/semantic_mutants.py` (+9 -6) </details> ### 📄 Description Claimed in the coordination issue as: TEST-SEMANTIC-ISOLATED-WORKERS — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134674247 ### What and why Run semantic test workers under Python isolated mode so host `PYTHONPATH` and 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-`PYTHONPATH` regressions 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 16` in 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#902
No description provided.