diff --git a/tests/test_vk_fuzz_run.py b/tests/test_vk_fuzz_run.py index d2959c60b..6aef6b878 100644 --- a/tests/test_vk_fuzz_run.py +++ b/tests/test_vk_fuzz_run.py @@ -239,6 +239,14 @@ class ProgramText(unittest.TestCase): build=folder, work_parent=folder, retries=retries)) self.assertEqual(got, ["vk_compute_test: crashed (exit 3221225477)"]) self.assertEqual(calls, [0]) # the retries are spent first, then it is skipped + # A signal death is a negative subprocess returncode on POSIX; it is a crash skip too. + with tempfile.TemporaryDirectory() as tmp: + with mock.patch.dict(os.environ, {"VK_FUZZ_SKIP_CRASH": "1"}): + got = self._run_with_fake_gpu( + tmp, [(-11, "", "")], [], + lambda folder, retries: R.run_programs([["v_mov_b32 v8, 0"]], words=1, wave=32, + build=folder, work_parent=folder, retries=retries)) + self.assertEqual(got, ["vk_compute_test: crashed (exit -11)"]) # Both harness errors stay fatal under VK_FUZZ_SKIP_CRASH: 1 is a CHECK failure, 2 a usage error. for fatal in ((1, "", "FAILED vkCreateShaderModule"), (2, "", "usage: ...")): with self.subTest(exit=fatal[0]), tempfile.TemporaryDirectory() as tmp: diff --git a/tools/vk_fuzz_run.py b/tools/vk_fuzz_run.py index dcfd97a03..0357d359b 100644 --- a/tools/vk_fuzz_run.py +++ b/tools/vk_fuzz_run.py @@ -18,6 +18,11 @@ wave64_text() rewrites the wave32 spellings of lane masks (vcc_lo, s20, s21) as cf_diff), bypassing llvm-mc while keeping the same translation and per-lane Vulkan execution path. For wave64 on a 32-wide GPU, LEONIDA_W64_EMULATE=1 passes --wave64-emulate to the translator. +LEONIDA_PC_TAIL_UBO=1 translates with rdna2spirv.py --pc-tail-ubo and passes the same variable to vk_compute_test +for 128-byte push-constant devices. VK_FUZZ_SKIP_CRASH=1 records any vk_compute_test exit other than 0, 1, 2 or 77 +as a skip, including signal deaths (which Python reports as negative return codes); exits 1 and 2 stay fatal because +they are harness/check failures, not driver crashes. + opaque=True (the default of run_programs) keeps the driver from folding the program: a `v_mov_b32 vN, K` seed becomes `v_xor_b32 vN, K ^ FILL, vF`, where vF is read from the output buffer, which vk_compute_test fills with 0xEEEEEEEE. The program computes the same values at run time, but a compiler that sees literal operands folds them itself, and