image_fuzz: separate harness errors and retry fatal pre-device startup once #2196
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2196"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T05:13:46Z.
Claimed in the coordination issue as
TEST-IMAGE-FUZZ-HARNESS-ERROR-EXIT(comment 7183240033).What
tools/image_fuzz.pydocuments exit 2 for setup/harness errors, but a nonzerovk_image_fuzzexit sharedrun_case'sFalseresult with real pixel mismatches. The fuzzer therefore counted a driver/loader crash as a translator mismatch and exited 1.This keeps the detailed harness failure line unchanged, returns a distinct
HARNESS_ERRORsentinel, counts harness errors separately, and preserves exit 2 as the dominant status. Hardware-oracle reporting also names the translator-side outcome as a harness error instead of falling through raw.Found while triaging an intermittent pre-device validation-loader crash on the AMD RDNA2 iGPU: the fuzzer reported it as a translator mismatch even though the harness never produced results.
Tested
python -m compileall -q tools/image_fuzz.py tests/test_image_fuzz.py— PASSpython -m pytest -q tests/test_image_fuzz.py tests/test_image_fuzz_hw.py tests/test_image_fuzz_work_isolation.py tests/test_build_runtime_fallback.py— 105 passed, 6 skipped, 16 subtests passedpython -I tools/image_fuzz.py --self-test— PASSNo game data or GPU required for these tests.
AI-assisted.
Consolidated retry behavior
This branch now also contains the pre-device startup retry formerly opened as #2202.
vk_image_fuzzis retried exactly once only when it dies with a fatal process status before printing itsdevice:line; at that point shader-module creation has not happened, so the shader under test cannot have caused the crash. Ordinary exit 1/2 results, post-device crashes, skips, and persistent startup failures are not hidden.The retry portion was validated on the AMD RDNA2 validation/pc-tail setup: a fresh seed-20 campaign hit the intermittent pre-device
0xc000041dfour times, each retry succeeded, and the campaign completed 20/20 match with exit 0. The branch head is exactly the previously reviewed #2202 head (6f6865c9a).Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:12:29Z.
Verified on main
a73a57e1(Ubuntu 24.04 x86-64, Python 3.13, pytest 9.2.0 from tests/requirements.txt, no GPU). Merges cleanly, also together with #2202 (both touch image_fuzz). With this PR, python -m pytest tests/test_image_fuzz.py: 66 passed. The PR's test file against main's tool: 5 failed, 61 passed, so the new tests fail on main and pass with the fix. compileall clean.AI-assisted: yes (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:50:30Z.
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
tests/test_image_fuzz.py: 65 passed, 1 skipped (main: 63 passed, the same 1 skip).(AI-assisted test run; output checked by hand.)
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T15:04:34Z.
Red/green:
pytest tests/test_image_fuzz.pyfails on main (9 failed, 60 passed, 1 skipped) and passes on head6f6865c9a0merged with main (69 passed, 1 skipped).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)