Repository navigation
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 6caeae4a on Windows 11: pytest tests/test_cf_diff.py tests/test_fmisc_diff.py tests/test_mem_diff.py tests/test_shader_diff_exit.py -q -> 89 passed, 56 subtests passed; git diff --check clean.
The four diff tools now exit 2 when every program was skipped, matching #4365/#4376, and the existing diff tests pass. No blocking issue.
|
Independent check of the head (CPU only, Linux, Turing box, no pytest installed so test_cf_diff.py is the one file I could not execute here and leave to CI):
No game data or GPU involved. AI-assisted. |
|
Tested 6caeae4 merged with main 03b09a0 on Linux (WSL2), Python 3.12.16: pass. |
|
Reviewed and tested 6caeae4 (already on top of main 03b09a0, so the merge is a fast-forward): looks good.
Python 3.14.4 and pytest 9.0.2 on WSL2 Ubuntu; no GPU used (CPU only). AI-assisted (Claude), on behalf of dev-ewann. |
|
Tested
AI-assisted (Devin). |
|
Follow-up from our own extra review (and thanks to Kam471, Flyander, SebSilent, kapitche, dev-ewann and Atomic258 for the runs): the single-program path still exited 0 when its program was skipped. Fixed in 50fe243. Verified first: What changed: the single-program path now uses the suite's precedence: a mismatch gives 1, otherwise a run where no wave matched (every wave skipped) prints "no program ran: every one was skipped" and gives 2, otherwise 0. With Same path in the other tools: Tests (Proxmox, Python 3.13): |
|
Tested
No GPU, no game data. AI-assisted. |
|
Tested 50fe243 merged with main 98fa503 on Linux (Python 3.12.16): fail - test_fmisc_diff 20 OK, test_mem_diff 17 OK, test_cf_diff (pytest) 42 passed, but tests/test_shader_diff_exit.py fails 1 of 16: |
…kipped test (main 0c48c1f) test_unsupported_translation_is_a_skip came to main with TEST-807 after this branch forked and asserted exit 0 for a run where every program was skipped, which this PR makes exit 2. It now checks the skip report only, as test_unsupported_interpreter_construct_is_a_skip does; test_a_run_where_every_program_was_skipped_is_not_a_success pins the exit code (kapitche on ItsNotRexed#4448).
|
Thanks @kapitche, right: On Linux, Python 3.13: |
|
Tested 6544b4a merged with main 98fa503 on Linux (WSL2), Python 3.12.16: pass. The earlier concern (tests/test_shader_diff_exit.py::HarnessErrorExit.test_unsupported_translation_is_a_skip returning 2 instead of 0) is resolved.
|
|
Reviewed and tested
Test gap: the body says the new check runs "after the harness-error and mismatch checks", but in Nits: the body still lists "the four new tests" and "Two existing tests ... changed", but there are now more of both. The AI-assisted. |
… two docstring lines
|
Thanks @KkelebekK. Closed in
The five test files: 115 tests pass on Linux, Python 3.13. |
|
Tested
No game files. AI-assisted review (Devin). |
|
Tested
Code read: in each tool, a mismatch (1) and a harness error (2) still take precedence; only a run with no pass at all now exits 2 with "no program ran: every one was skipped". A mix of skips and passes still exits 0. AI-assisted (Claude). |
Kam471
left a comment
There was a problem hiding this comment.
Reviewed at ee42b68 (test: pin the exit order on the cf_diff and mem_diff suite path; ...).
Commands (worktree review-4448, detached at pr/4448):
python -I -m pytest tests/test_cf_diff.py tests/test_mem_diff.py tests/test_fmisc_diff.py tests/test_shader_diff_exit.py -q
-> 98 passed, 61 subtests passed (11.5 s)python -I -m pytest tests/test_shader_diff.py -q-> 17 passed (regression check of the other shader_diff suite)git diff --check-> clean
The new branch only fires when nothing was compared: harness error (2) first, then mismatch (1), then all-skipped (2),
else 0. Tests pin all three orderings on the suite path and the --program path, and keep "some skips beside passes
still exits 0". 0 -> 2 for an all-skipped run is the stated intent (#4365/#4376); no in-repo caller relies on the old 0.
Verdict: LGTM.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed shader_diff run exits 2 (ItsNotRexed#4448) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # tests/test_shader_diff_exit.py
|
Tested
No game files. AI-assisted (Claude Code). |
|
Closing: |
Item: new, claimed here.
Depends on: none.
Why
Pattern set by #4365 (wint_diff) and #4376 (vint, pk16, salu, sdwa, sad): a differential run in which every generated program is skipped compared nothing, yet exits 0 ("0 pass, 0 mismatch, N skipped"). crosslane_fuzz.py already exits 2 with "no program ran: every one was skipped". The same gap was still in cf_diff.py, mem_diff.py, shader_diff.py and fmisc_diff.py.
What
After the harness-error and mismatch checks, each tool prints "no program ran: every one was skipped" and returns 2 when no program passed. Runs with some passes and some skips still exit 0. The exit-code line of each module docstring says so.
Left out on purpose: valu_fuzz.py and lds_fuzz.py (already return 2 when ran == 0), valu_int_diff.py (has no skip concept), image_fuzz.py (its translator path counts skips from Vulkan runs and needs its own change), and the files #4365/#4376 edit.
Three existing tests in tests/test_shader_diff_exit.py changed. test_unsupported_interpreter_construct_is_a_skip and its sibling asserted exit 0 for a run whose only program was skipped; they now only check the skip is counted, and a new test asserts exit 2 (another asserts passes mixed with skips still exit 0). test_a_valid_limit_still_runs_that_many_programs mocked run_one with the status "pass", which the suite counts as a skip, so it passed only through the exit-0 rule; it now returns "match".
Tested
Eight new test functions: cf_diff 3 (all-skipped suite run exits 2; a mismatch-only and an all-pass suite run exit 1 and 0, so the check order is pinned; --program exits like the suite), mem_diff 2 (all-skipped exits 2; mismatch-only and all-pass runs exit 1 and 0), fmisc_diff 1, shader_diff 2. The order tests fail if the new check is moved above the mismatch check or turned into "if True", and pass on the real code (tried on both tools). The all-skipped tests fail on main (exit 0) and pass here. The five test files (cf_diff, mem_diff, fmisc_diff, shader_diff, shader_diff_exit) pass: 115 tests, on a RunPod CPU.
AI-assisted. No game files.