OLD-9764: w64_graphics: a vk_harness timeout fails that fixture; the rest still run #27

Manually merged
github merged 2 commits from gh-pr/27/head into gh-pr/27/base 2026-11-26 08:41:18 +00:00
Owner

@⁠ItsMrDubey on GitHub · 2026-11-24 02:01 UTC · original
ItsMrDubey:w64-graphics-timeout → main · +34 −1 · 2 files · 2 commits · merged 2026-11-24 02:26 UTC

Claimed in the coordination issue as: OLD-9764 (#14)

What and why

Old #9764: runtime/test/shaders/w64_graphics.py calls vk_harness with subprocess.run(..., timeout=120). When a draw hangs past that, TimeoutExpired escapes check() and main(), so a multi-fixture run ends in a traceback and the fixtures after the hung one are never tested or reported.

Fix: main() catches subprocess.TimeoutExpired around each fixture's check(), reports vk_harness timed out after 120 s as that fixture's failure, carries on with the rest, and still returns 1. This covers every vk_harness call made under check() (draw, _draw_heap, _wave_size probes, live_width).

Carried from old-pr/9770 by Joaco9020 (original commit and authorship kept). One follow-up commit of mine: the regression test now uses patch.object / patch.dict like tests/test_w64_graphics_probe.py and _reference.py, and clears W64G_REF / W64G_SAVE_REF and the _applied probe cache so the environment can't affect it.

Tested

Windows 11, Python 3.11.9, no GPU needed (subprocess.run is mocked: the first call times out, later ones return UNSUPPORTED).

  • Before, new test against main's w64_graphics.py: python -I tests/test_w64_graphics_args.py -> FAILED (errors=1), subprocess.TimeoutExpired ... timed out after 120 seconds escapes main()
  • After: python -I tests/test_w64_graphics_args.py -> Ran 4 tests ... OK; first fixture prints the timeout, second fixture still runs (SKIP), rc 1
  • python -I tests/test_w64_graphics_probe.py -> OK; python -I tests/test_w64_graphics_reference.py -> OK
  • python -I scripts/check_no_game_data.py runtime/test/shaders/w64_graphics.py tests/test_w64_graphics_args.py -> clean

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • n/a: no translator rule
**@⁠ItsMrDubey** on GitHub · 2026-11-24 02:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/27) `ItsMrDubey:w64-graphics-timeout` → `main` · +34 −1 · 2 files · 2 commits · merged 2026-11-24 02:26 UTC Claimed in the coordination issue as: OLD-9764 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Old #9764: `runtime/test/shaders/w64_graphics.py` calls `vk_harness` with `subprocess.run(..., timeout=120)`. When a draw hangs past that, `TimeoutExpired` escapes `check()` and `main()`, so a multi-fixture run ends in a traceback and the fixtures after the hung one are never tested or reported. Fix: `main()` catches `subprocess.TimeoutExpired` around each fixture's `check()`, reports `vk_harness timed out after 120 s` as that fixture's failure, carries on with the rest, and still returns 1. This covers every `vk_harness` call made under `check()` (`draw`, `_draw_heap`, `_wave_size` probes, `live_width`). Carried from `old-pr/9770` by Joaco9020 (original commit and authorship kept). One follow-up commit of mine: the regression test now uses `patch.object` / `patch.dict` like `tests/test_w64_graphics_probe.py` and `_reference.py`, and clears `W64G_REF` / `W64G_SAVE_REF` and the `_applied` probe cache so the environment can't affect it. ### Tested Windows 11, Python 3.11.9, no GPU needed (`subprocess.run` is mocked: the first call times out, later ones return UNSUPPORTED). - Before, new test against main's `w64_graphics.py`: `python -I tests/test_w64_graphics_args.py` -> `FAILED (errors=1)`, `subprocess.TimeoutExpired ... timed out after 120 seconds` escapes `main()` - After: `python -I tests/test_w64_graphics_args.py` -> `Ran 4 tests ... OK`; first fixture prints the timeout, second fixture still runs (SKIP), rc 1 - `python -I tests/test_w64_graphics_probe.py` -> OK; `python -I tests/test_w64_graphics_reference.py` -> OK - `python -I scripts/check_no_game_data.py runtime/test/shaders/w64_graphics.py tests/test_w64_graphics_args.py` -> clean AI-assisted: yes ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] n/a: no translator rule
A draw that hung past subprocess.run's 120 s timeout raised TimeoutExpired out
of main(), so a multi-fixture run ended in a traceback and never reported the
fixtures after it. main() now reports "vk_harness timed out after 120 s" for
that fixture, goes on, and still exits 1. The test drives main() and check()
with a vk_harness that times out on its first call.

Fixes old #9764
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:41:16 +00:00
github manually merged commit 910b046302 into gh-pr/27/base 2026-11-26 08:41:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.