Repository navigation
vk_compute_test: flush stdout before exit and note empty stdout in check.py - #7484
bitzin-dev wants to merge 1 commit into
Conversation
|
Tested 43df6c6 on Arch Linux, Python 3.14.10, CPU only (no GPU run; the fflush half is C++): pass — tests/test_run_gpu_tests.py 63/63 OK including the new empty-stdout test. Negative control: check.py + vk_compute_test.cpp swapped to merge-base → exactly 1 failure (the new test, '(empty stdout)' missing); restored, green again. Overlap note: complements #7439 (transport-layer marker vs result-parsing note; verified they compose — the marker can't suppress the note), land both or either independently. No game files. AI-assisted. |
|
Tested
Synthetic inputs only. AI-assisted. |
|
Tested 43df6c6 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
|
Tested on NVIDIA GeForce GTX 1080 (Pascal, subgroup 32..32, no mesh shaders or fragment barycentrics), Linux (Ubuntu 26.04.1), driver 580.178.04, llvm-mc 21. No game files.
Test programs rebuilt from the merged tree. Every PASS/FAIL/SKIP row and its words are identical to main; no result line missing. AI-assisted. |
Addresses the finding reported by @iTzAlvar in #7333:
When
vk_compute_testis invoked via a pipe (such as incheck.pyorsubprocess.run(capture_output=True)), standard C runtime full-buffering can cause the test results on stdout to be dropped if the process exits before the CRT buffer is flushed, leaving only the unbuffered stderrdevice:line.This PR:
std::fflush(stdout);inruntime/test/vk_compute_test.cpp:main()right afterOptInValidation::exit_status(run(argc, argv))to guarantee all output reaches the pipe buffer before exit.runtime/test/shaders/check.py:run(), detects when a child exited with code 0 but left stdout empty with stderr content, appending\n(empty stdout)so diagnostic failures immediately clarify that the test stdout was lost rather than displaying an ambiguous error.tests/test_run_gpu_tests.py:test_check_py_run_flags_empty_stdout.Validation:
python -I tests/test_run_gpu_tests.py: 63 tests OK.