runtime, tests: bound dstorage and dxgi tests with ctest timeouts and route device filter tools through wine (TEST-WINE-TIMEOUTS-DEVICE-FILTER) #1176

Manually merged
github merged 1 commit from gh-pr/1176/head into gh-pr/1176/base 2026-11-26 09:41:30 +00:00
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:38 UTC · original
abnalstlll-byte:feat/test-wine-timeouts-device-filter → main · +12 −2 · 2 files · 1 commits · merged 2026-11-25 23:32 UTC

Addresses finding on Linux/Wine test execution (TEST-WINE-TIMEOUTS-DEVICE-FILTER):

1. CTest Execution Bounds (runtime/CMakeLists.txt, tests/test_ctest_registration.py)

  • Adds TIMEOUT 120 to dstorage, dxgi_host_parity, and dxgi_waitable_latency.
  • Prevents indefinite test hangs under Wine (such as during winedbg crash attaches or OpenFile: null or empty path stalls) from blocking continuous test runs.
  • Adds test coverage in tests/test_ctest_registration.py (test_host_parity_and_storage_tests_have_timeouts) verifying that these tests enforce explicit CTest timeouts.

2. Linux / Wine Executable Routing (runtime/test/check_device_filter_tools.py)

  • Routes Windows .exe invocations (vk_descriptor_bench.exe, vk_sandbox.exe) through wine when running on a non-Windows host (os.name != "nt").
  • Gracefully returns UNSUPPORTED (77) if wine is unavailable or if execution fails, resolving OSError: [Errno 8] Exec format error during host Python execution on Linux.

Verification

  • python -I tests/test_ctest_registration.py: 5/5 PASSED.
  • python -m compileall runtime/test/check_device_filter_tools.py tests/test_ctest_registration.py: Clean.
  • python -I scripts/check_no_game_data.py: 0 violations (100% clean-room).
  • AI-assisted: yes.
**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:38 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176) `abnalstlll-byte:feat/test-wine-timeouts-device-filter` → `main` · +12 −2 · 2 files · 1 commits · merged 2026-11-25 23:32 UTC Addresses finding on Linux/Wine test execution (`TEST-WINE-TIMEOUTS-DEVICE-FILTER`): ### 1. CTest Execution Bounds (`runtime/CMakeLists.txt`, `tests/test_ctest_registration.py`) - Adds `TIMEOUT 120` to `dstorage`, `dxgi_host_parity`, and `dxgi_waitable_latency`. - Prevents indefinite test hangs under Wine (such as during `winedbg` crash attaches or `OpenFile: null or empty path` stalls) from blocking continuous test runs. - Adds test coverage in `tests/test_ctest_registration.py` (`test_host_parity_and_storage_tests_have_timeouts`) verifying that these tests enforce explicit CTest timeouts. ### 2. Linux / Wine Executable Routing (`runtime/test/check_device_filter_tools.py`) - Routes Windows `.exe` invocations (`vk_descriptor_bench.exe`, `vk_sandbox.exe`) through `wine` when running on a non-Windows host (`os.name != "nt"`). - Gracefully returns `UNSUPPORTED` (77) if `wine` is unavailable or if execution fails, resolving `OSError: [Errno 8] Exec format error` during host Python execution on Linux. ### Verification - `python -I tests/test_ctest_registration.py`: **5/5 PASSED**. - `python -m compileall runtime/test/check_device_filter_tools.py tests/test_ctest_registration.py`: **Clean**. - `python -I scripts/check_no_game_data.py`: **0 violations** (100% clean-room). - AI-assisted: yes.
Bound dstorage, dxgi_host_parity, and dxgi_waitable_latency with 120 s ctest timeouts.

AI-assisted (Claude Code, Claude Opus 5.5).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:41:27 +00:00
github manually merged commit 10e2ae8816 into gh-pr/1176/base 2026-11-26 09:41:30 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 19:45 UTC · original · approved these changes

Reviewed exact head b7049814bebf32d1484ccd3f550b4892aad5ea58 as KernelSmoker.

Independent Linux verification: python3 -I tests/test_ctest_registration.py passed 5/5; py_compile, scripts/check_no_game_data.py, and git diff --check passed. Three isolated mocks verified the new .exe routing through WINE, and that missing Wine or an OSError returns the documented UNSUPPORTED result.

This host has no Wine executable, so I did not run the Windows binaries or a Wine integration test. The Windows and macOS hosted checks were queued when I checked them; this review does not claim those jobs passed.

**@⁠KernelSmoker** on GitHub · 2026-11-24 19:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#pullrequestreview-6046192005) · **approved these changes** Reviewed exact head `b7049814bebf32d1484ccd3f550b4892aad5ea58` as `KernelSmoker`. Independent Linux verification: `python3 -I tests/test_ctest_registration.py` passed 5/5; `py_compile`, `scripts/check_no_game_data.py`, and `git diff --check` passed. Three isolated mocks verified the new `.exe` routing through `WINE`, and that missing Wine or an `OSError` returns the documented `UNSUPPORTED` result. This host has no Wine executable, so I did not run the Windows binaries or a Wine integration test. The Windows and macOS hosted checks were queued when I checked them; this review does not claim those jobs passed.
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:56 UTC · original

Tested b7049814b on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (clang-cl + xwin cross-build):

  • python3 -m unittest tests/test_ctest_registration.py: 5/5 passed (0.041 s)
  • vulkan_device_filter: Passed (5.40 s)
  • vk_device_filter_tools (check_device_filter_tools.py routed through Wine): Passed (16.10 s)
  • The three Wine-bounded tests fail cleanly inside their timeouts rather than hanging:
    • dstorage (15.70 s): 329 checks, 2 failures (FAIL: the copy reached the guard page, FAIL: a running request is pending)
    • dxgi_host_parity (11.09 s): crashes in Wine's wined3d+0x54143 from dxgi_host_parity_test.cpp:263
    • dxgi_waitable_latency (11.39 s): Failed (11.39 s)

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#issuecomment-7142825814) Tested `b7049814b` on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (clang-cl + xwin cross-build): - `python3 -m unittest tests/test_ctest_registration.py`: **5/5 passed** (0.041 s) - `vulkan_device_filter`: **Passed** (5.40 s) - `vk_device_filter_tools` (`check_device_filter_tools.py` routed through Wine): **Passed** (16.10 s) - The three Wine-bounded tests fail cleanly inside their timeouts rather than hanging: - `dstorage` (15.70 s): `329 checks, 2 failures` (`FAIL: the copy reached the guard page`, `FAIL: a running request is pending`) - `dxgi_host_parity` (11.09 s): crashes in Wine's `wined3d+0x54143` from `dxgi_host_parity_test.cpp:263` - `dxgi_waitable_latency` (11.39 s): **Failed** (11.39 s) AI-assisted: yes
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:10 UTC · original

Recommendation: [MERGE]

Reasoning: Adds 120 s CTest timeouts to dstorage, dxgi_host_parity and dxgi_waitable_latency, and routes the device-filter tool's .exe calls through Wine on non-Windows hosts (skip 77 if Wine is missing). Small test-infrastructure change. Verified by madhyn (Wine + RTX 3060 Ti) and KernelSmoker. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#issuecomment-7143136309) **Recommendation:** [MERGE] **Reasoning:** Adds 120 s CTest timeouts to `dstorage`, `dxgi_host_parity` and `dxgi_waitable_latency`, and routes the device-filter tool's `.exe` calls through Wine on non-Windows hosts (skip 77 if Wine is missing). Small test-infrastructure change. Verified by madhyn (Wine + RTX 3060 Ti) and KernelSmoker. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
Author
Owner

@⁠azsekazvamdimitar on GitHub · 2026-11-25 07:46 UTC · original

Overlap note: the device filter tools half of this is also in #1086 (commit f43536b1b), done the other way: CMake passes CMAKE_CROSSCOMPILING_EMULATOR to check_device_filter_tools.py as --runner, the way the neighbouring tests get -DRUNNER, instead of the script looking for wine on PATH. That way a Proton build (emulator set to Proton's files/bin/wine) runs the tools with Proton's Wine rather than whatever wine is installed. Tested on Linux natively, under WineHQ 11.22 and under GE-Proton11-14. Whichever lands first, the other should drop that part; the ctest timeouts here don't overlap.

AI-assisted (Claude).

**@⁠azsekazvamdimitar** on GitHub · 2026-11-25 07:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#issuecomment-7156246911) Overlap note: the device filter tools half of this is also in #1086 (commit f43536b1b), done the other way: CMake passes `CMAKE_CROSSCOMPILING_EMULATOR` to `check_device_filter_tools.py` as `--runner`, the way the neighbouring tests get `-DRUNNER`, instead of the script looking for `wine` on `PATH`. That way a Proton build (emulator set to Proton's `files/bin/wine`) runs the tools with Proton's Wine rather than whatever `wine` is installed. Tested on Linux natively, under WineHQ 11.22 and under GE-Proton11-14. Whichever lands first, the other should drop that part; the ctest timeouts here don't overlap. AI-assisted (Claude).
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 11:22 UTC · original

The timeouts look good; the device-filter half needs a fix or should be dropped.

  • When Wine is missing, run() returns 77, but main() reads that as a tool failure. The script prints FAIL: ... --list-devices exit 77 and exits 1 instead of skipping. The OSError path ends the same way.
  • The vk_device_filter_tools part was claimed earlier as TEST-WINE-PROTON-LEFTOVERS (#1086, which uses CMAKE_CROSSCOMPILING_EMULATOR). #1219 also does it, propagates 77 and has a unit test. Please drop that part here and keep the TIMEOUT 120 changes.
  • The approval and the Wine run were on b7049814; the head is now e1d98192.
  • Merged with main, dstorage, dxgi_host_parity, dxgi_waitable_latency and vk_device_filter_tools give the same results as main under Wine (lavapipe and an AMD iGPU).
  • Please name the model in the AI note.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 11:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#issuecomment-7160952218) The timeouts look good; the device-filter half needs a fix or should be dropped. - When Wine is missing, `run()` returns 77, but `main()` reads that as a tool failure. The script prints `FAIL: ... --list-devices exit 77` and exits 1 instead of skipping. The `OSError` path ends the same way. - The `vk_device_filter_tools` part was claimed earlier as `TEST-WINE-PROTON-LEFTOVERS` (#1086, which uses `CMAKE_CROSSCOMPILING_EMULATOR`). #1219 also does it, propagates 77 and has a unit test. Please drop that part here and keep the `TIMEOUT 120` changes. - The approval and the Wine run were on `b7049814`; the head is now `e1d98192`. - Merged with `main`, `dstorage`, `dxgi_host_parity`, `dxgi_waitable_latency` and `vk_device_filter_tools` give the same results as `main` under Wine (lavapipe and an AMD iGPU). - Please name the model in the AI note. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 21:43 UTC · original

Updated in commit 10e2ae881:

  • Rebased onto latest \main.
  • Dropped the \check_device_filter_tools.py\ changes entirely per review, leaving device filter runner routing to #1086 / #1219.
  • Retained the \TIMEOUT 120\ ctest properties for \dstorage, \dxgi_host_parity, and \dxgi_waitable_latency.
  • Verified \python3 -I tests/test_ctest_registration.py\ (5/5 passed) and \scripts/check_no_game_data.py\ (clean).

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 21:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1176#issuecomment-7175456694) Updated in commit 10e2ae881: - Rebased onto latest \main\. - Dropped the \check_device_filter_tools.py\ changes entirely per review, leaving device filter runner routing to #1086 / #1219. - Retained the \TIMEOUT 120\ ctest properties for \dstorage\, \dxgi_host_parity\, and \dxgi_waitable_latency\. - Verified \python3 -I tests/test_ctest_registration.py\ (5/5 passed) and \scripts/check_no_game_data.py\ (clean). AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.