Commit Graph

3 Commits

Author SHA1 Message Date
89924428f9 fix(tests): report unexpected shader interpreter failures 2026-11-22 17:49:31 +03:00
780a0a479d shader_diff: refuse an option below 1 instead of running nothing
--programs and --limit took bare ints, so 0 or a negative value ran no
program and still printed "0 programs (seed 1): 0 pass, 0 mismatch ..."
with exit 0. That reads as a pass from the differential oracle the docs
tell people to run, and a negative --limit is easy to get from shell
arithmetic. --max-ops had the same gap and died with
ValueError: empty range in randrange(1, 1).

All three now require at least 1: one argparse line, exit 2, which is what
anim_index, rbf0_index, rpf9_carve and shader_disasm already do. Defaults,
the output format and the 2/1/0 exit codes are unchanged, and the new
tests cover both the refusal and a valid --limit still running that many
programs.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 05:00:37 -06:00
9df1a6cee1 shader_diff: a harness error exits 2, as documented, not 1 like a mismatch
run_suite sets first_failure for a harness error too, and main returned 1
whenever first_failure was set, so the exit-2 branch was unreachable and a
broken harness read as a translator mismatch.
2026-11-22 12:37:25 +05:30