tooling: refuse a missing form_coverage records directory #2082
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2089"
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 R0Y00/Xbox2Windows. Originally posted by alvaroolt on 2026-11-25T00:07:03Z.
Change
tools/form_coverage.pyreads--recordswithPath.glob, which yields nothing for a path that does not exist. A mistyped directory, or the defaultout/build/dev/form_coverageused with areleaseJUnit file, therefore measured zero shader records, silently reported every gfx form (and the record-mode x64 fixtures) as uncovered, and exited 0. With--gapsor--jsonnothing on the output said why, so the gap list that CONTRIBUTING.md recommends for choosing a form was wrong.Measured on a full
devrun ata0bc0f9a, before this change (the tool is unchanged on489d5797):--recordsout/build/dev/form_coverage(this run)out/build/release/form_coverage(241 records from an earlier run)out/build/relase/form_coverage(typo, does not exist)After this change:
--recordspath that is not a directory is an error (exit 2):form_coverage: out\build\relase\form_coverage: records directory does not exist(orrecords path is not a directory).form_coverage: out\build\release\form_coverage: none of the 241 records here was written during this JUnit run, so no record-mode or shader form is counted.devdefault after a fulldevrun, where the directory exists and the records are fresh.CONTRIBUTING.mdnow says to use the records directory of the preset that produced the JUnit file. No issue.Verification
Environment: Windows 11 10.0.26300, MSVC 14.52, Windows SDK 10.0.26100, Python 3.12 (
out/pe-env).The new
check_records_errorsruns the CLI on a synthetic JUnit file and checks five cases:--gaps: exit 2, one-line diagnostic, empty stdout;Before the change, the first case failed: exit 0, empty stderr.
Negative controls, both reverted afterwards:
check_records_errorsfail.Full suites on
489d5797plus this change (NVIDIA GeForce RTX 5080 driver 32.0.16.2124, AMD Radeon iGPU, WARP; debug layer unavailable):The one
devtimeout wascompute_store_aot_guard_read_hardware(45 s limit), which started at the beginning of the-j8run. Rerun alone, it passed in 22.45 s, and it passed in thereleasesuite. This change does not touch it.Rebased onto
6218beb2before pushing. Of the touched files, onlytests/form_coverage_check.pychanged upstream (#1971). The rebase was clean, andpython -B tests/form_coverage_check.pyandtests/docs_links_check.pypass again on8bc3a383. The full suites were not rerun on this base.The 93 Python checks that the workflow runs without arguments pass, and so does
tests/docs_links_check.py. The other 9 listed checks take LLVM arguments and run in the LLVM 15 job.tests/rdna2_tools_check.pypasses with LLVM 15.0.7 (LLVM_LIB,LLVM_MC,LLVM_OBJCOPYset).Evidence and follow-up
No fixtures or third-party data. The warning is a heuristic for one case only: every record in the directory falls outside the run. A directory that mixes fresh and stale records (a filtered run in an existing build directory) is measured without a warning, as before.
Checklist
AI-assisted (Claude Code).