Repository navigation
tests: find LLVM 15 on Windows PATH for the descriptor-store round trip - #2205
Conversation
tedin7
left a comment
There was a problem hiding this comment.
Review of head c59738d (tests/compute_store_check.py only).
Findings: 0 P1, 0 P2.
find_llvm15()now scans PATH plus the Program Files fallback on Windows, requires clang.exe, llvm-objcopy.exe and LLVM-C.dll together, and checksclang --versionfor major 15 before use. Theos.name == "nt"guard keeps Linux behavior unchanged. A failing or missing clang is skipped (OSError / non-zero exit), so the optional round trip stays optional.- The new control in
descriptor_store_controls()builds a fake complete toolchain in a temp dir, patches PATH and the version probe, and asserts the exact tuple. It only runs on Windows, as the draw mode that calls it does. - No competing PR touches this function.
Commands executed locally:
python3 tests/docs_links_check.py-> pass (405 links)python3 tests/bidi_controls_check.py-> passgit diff --check origin/main...HEAD-> clean- Control run with the module's
os.nameforced tont(Linux):CONTROL_PASS - Mutation 1: version regex changed from 15 to 14 -> control fails (AssertionError)
- Mutation 2: PATH scan removed (only Program Files left) -> control fails (AssertionError)
- Worktree restored with
git checkout -- .after each mutation.
Note: GitHub shows the Windows checks run as action_required (needs maintainer approval), so Build and test on Windows has not run for this head yet.
AI-assisted; commands listed were executed locally.
tedin7
left a comment
There was a problem hiding this comment.
Review of head 56f05c7 (tests/compute_store_check.py only).
Result: 0 P1, 0 P2.
What I checked:
find_llvm15()now walks PATH (plus the Program Files fallback) on Windows only, requires absolute directories with clang.exe, llvm-objcopy.exe and LLVM-C.dll, and accepts the toolchain only ifclang --versionreports 15.x. A broken or wrong-version clang is skipped instead of failing the run.- The new control in
descriptor_store_controls()builds a fake complete toolchain in a temp dir and asserts discovery outside Program Files. It is gated onos.name == "nt", so it only runs where the code under test runs. - Overlap: only #1803 (large feature PR, CHANGES_REQUESTED) carries an older copy of
find_llvm15; it does not fix the same behavior, so there is no competing fix. It will need a rebase onto this change after merge.
Commands executed locally:
git diff --check origin/main...HEAD-> cleanpython3 tests/docs_links_check.py-> 407 links OKpython3 tests/bidi_controls_check.py-> no bidi controls- Harness running
descriptor_store_controls()withos.namepatched tont-> passes - Mutation 1: version regex 15 -> 14 -> new control fails (AssertionError)
- Mutation 2: PATH-directory branch disabled -> new control fails (AssertionError)
- Worktree restored with
git checkout -- . - CI at this head: Linux checks, fixtures, and
Build and test on Windows= SUCCESS.
AI-assisted; commands listed were executed locally.
|
The full Windows 2025 Debug run now provides a hosted regression case for this change. On the same |
While running the formatted-store fixture for #2022, I put the official Windows LLVM 15.0.7 package on
PATHoutside Program Files. Itsclang.exe,llvm-objcopy.exeandLLVM-C.dllwere available, but the fixture still printedllvm15_round_trip=skipped. The package supplies clang’s integrated AMDGPU assembler. The fixture looked for that assembler only in the default install directory. LLVM 15.0.7 releaseThe Windows clang fallback now looks for all three files together in an absolute PATH directory or the default location. It checks the clang major version before selecting the toolchain. A regression control supplies a non-default directory to the detector.
Verification
Current head
56f05c79includes the upstream MSVC build fix from #2204. I reran the descriptor-store WARP fixture with the Windows LLVM 15 package on PATH. The round trip matched and the wrong-value control failed at word 14 as expected. The upstream Windows build, Linux checks, and gfx1013 assembly checks passed. Upstream CI · Full Windows 2025 Debug and Release runpython -B tests/compute_store_check.py draw-descriptor-store-format <dxc> <offscreen_check> warpon Windows with LLVM 15.0.7 on PATH. Base33a47702printedllvm15_round_trip=skipped. This branch printedllvm15_round_trip=match. The real fixture assembled for gfx1013, disassembled, lowered identically and passed WARP readback with 1 and 2 groups. Both refusal cases passed. The wrong 32_UINT store produced the expected mismatch at word 14.git diff --checkpassed.AI-assisted with Codex (GPT-6.2 Astra xhigh, as specified by the contributor).