[PR #27] [MERGED] OLD-9764: w64_graphics: a vk_harness timeout fails that fixture; the rest still run #81

Closed
opened 2026-11-26 20:16:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/27
Author: @ItsMrDubey
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: w64-graphics-timeout


📝 Commits (2)

  • 2191b71 w64_graphics: a vk_harness timeout fails that fixture; the rest still run (#9764)
  • 910b046 tests: the w64_graphics timeout test patches subprocess.run and isolates the reference env

📊 Changes

2 files changed (+34 additions, -1 deletions)

View changed files

📝 runtime/test/shaders/w64_graphics.py (+4 -1)
📝 tests/test_w64_graphics_args.py (+30 -0)

📄 Description

Claimed in the coordination issue as: OLD-9764 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7119646964)

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

🔄 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/27 **Author:** [@ItsMrDubey](https://github.com/ItsMrDubey) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `w64-graphics-timeout` --- ### 📝 Commits (2) - [`2191b71`](https://github.com/ubiquitarianism/leonida/commit/2191b71de6cd9f105b702873f1b9dd0cf688f8dc) w64_graphics: a vk_harness timeout fails that fixture; the rest still run (#9764) - [`910b046`](https://github.com/ubiquitarianism/leonida/commit/910b0463021db162aca21b73b972073cbd0493ed) tests: the w64_graphics timeout test patches subprocess.run and isolates the reference env ### 📊 Changes **2 files changed** (+34 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shaders/w64_graphics.py` (+4 -1) 📝 `tests/test_w64_graphics_args.py` (+30 -0) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9764 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7119646964) ### 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:16:44 +01:00
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#81
No description provided.