Skip to content

fix(tests): preserve standalone shader checker timeout output - #5009

Open
evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:codex/shader-check-timeout-output
Open

evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:codex/shader-check-timeout-output

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: EGEN-SHADER-CHECK-TIMEOUT-OUTPUT (Codex)

What and why

The standalone shader test checker reports its deadline when a child process hangs, but drops everything the child printed. Retain captured stdout and stderr with the deadline so a timeout identifies the last step reached. Handle both bytes and text in Python's timeout exception. This changes the standalone checker; the separate suite runner is covered by #2354.

Tested

  • On Linux, the real subprocess regression failed against main because both output streams were missing. A separate regression with text streams failed against the first candidate with an AttributeError. Both pass on the published head.
  • python -B -I tests/test_gpu_test_timeout.py passed all 9 tests on Windows, including the real child that writes both streams before timing out. The nine focused tests also passed on Linux. CPU-only, no GPU or driver used.
  • git diff --check passed.

AI-assisted: yes

Checklist

  • No game data, keys or decryption, including in logs or reports.
  • Translator contract updated where applicable. No translator rule changed.

@Atomic258

Copy link
Copy Markdown
Contributor

Independent check — pass (CPU only, synthetic checker outputs, no game files).

Environment: Windows 11, CPython 3.15.2.

  • python -I tests/test_gpu_test_timeout.py → 9/9 on the PR head
  • Negative control: same suite against main's runtime/test/shaders/check.py → 3 failures — timeout output is dropped on the parent, preserved on the head
  • compileall clean on check.py

AI-assisted (Devin).

@dcastell1

Copy link
Copy Markdown
Contributor

Code read + CPU tests, 6ed78ba: pass (tests/test_shader_checks.py:).

@JRamos1993

Copy link
Copy Markdown
Contributor

Tested 6ed78ba merged onto main 3faac55 on an RTX 5090 (driver 616.92), Windows 11, Vulkan SDK 1.4.363. The GPU test programs were built from the same tree:

  • scripts/run_gpu_tests.py: 170/217 passed, 47 skipped, 0 failed. main 3faac55 gives 170/217, 47 skipped, 0 failed. All 221 test shaders translate and pass spirv-val.
  • tests/test_gpu_test_timeout.py: ran 9 tests in 1.153s; OK.

AI-assisted (Claude Code).

@gertify

gertify commented Nov 23, 2026

Copy link
Copy Markdown

Tested 6ed78ba on Intel UHD 630 (Coffee Lake GT2), Mesa 25.2.8 ANV, Ubuntu 24.04: tests/test_gpu_test_timeout.py passes (9 tests) and tests/test_run_gpu_tests.py passes (41 tests). The full GPU suite with LEONIDA_VK_DEVICE=Intel after a full build gives 154/217 passed, 61 skipped, with only cs_fmt_int_narrow and cs_signed_zero_nan failing, the same counts and failures as the recorded main 3faac55 run on this GPU. A nonexistent device name fails cs_bounds with "no Vulkan physical device matches", so the filter applied.

AI-assisted.

@Atomic258

Copy link
Copy Markdown
Contributor

Tested 6ed78ba on Windows Server 2022, CPython 3.13.12: pass

  • python -I tests/test_gpu_test_timeout.py -> Ran 9 tests, OK
  • Negative control (runtime/test/shaders/check.py swapped to upstream/main): FAILED (failures=3)

git diff --check clean; python -m compileall -q exit 0. No game files, no GPU. AI-assisted (Devin).

@itsonlysimbo

Copy link
Copy Markdown
Contributor

Tested 6ed78ba2 on RTX 4070, NVIDIA 621.14, Windows 11 (10.0.26300), MSVC 19.44, Ninja, RelWithDebInfo, Vulkan SDK 1.4.363, llvm-mc 23.1.6, test programs from main 3faac557: pass.

  • tests/test_gpu_test_timeout.py: 9 passed, 9 subtests passed.
  • run_gpu_tests.py: 170/217 passed, 47 skipped, 0 failed, same as main; no suite shader's SPIR-V changes.
  • tests/semantic: 6245 tests, with the same 3 failures and 2 errors main has on this machine; none new.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants