Repository navigation
PR checks: the PR's smoke block must show how its run ended (#2213) - #2219
fromthemoonx wants to merge 1 commit into
Conversation
|
Reviewed the diff; the four lines are now required and the main block stays lenient, which matches #2213. One hole is left in the new
Since the point of #2213 is that a hand-edited block must not pass, I would make Everything else looks right to me: the missing-line messages, |
|
One more bypass in the same area, now that the four lines are mandatory: the comparison guards treat 0 as "no value". Requiring |
…2213) scripts/pr_check.py required only `title`, `seconds` and `frames shown` in an `xcl-smoke` block. The PR's `device removals`, `crashes`, `exit` and `peak commit` lines were read with dict.get(), and a missing or non-numeric value counted as clean. A block that lost its `crashes: 1` line, or that kept smoke.ps1's own `peak commit: n/a MB`, passed. So did `exit: 0xc0000005`, because only an exit starting with "killed" was a problem. The PR's own block now needs all four lines, in the form smoke.ps1 prints them: the two counters as plain integers and `peak commit` as `<n> MB`. number() reads only leading digits, so `1.5 GB` was 1 and `3,000 MB` was 3. An exit other than 0x0 is a problem (`killed (no exit)` keeps its message). `seconds` must not be 0 in either block, and `frames shown` and `peak commit` must not be 0 in the PR's: the comparisons treat 0 as "no value" and skipped themselves. Main's block is otherwise unchanged, because its run may have crashed (xcl-dev#1506). Fixes xcl-dev#2213 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d706c76 to
8d99ad3
Compare
|
Thanks @itsonewi, both points were right. On
New tests cover each case. 19 tests pass, and 13 subtests fail against Claude Code (Claude Opus 5.5) made the change and wrote this reply. |
scripts/pr_check.pyrequired onlytitle,secondsandframes shownin anxcl-smokeblock. The PR'sdevice removals,crashes,exitandpeak commitlines were read withdict.get(), and a missing or non-numeric value counted as clean. So a block that lost itscrashes: 1line passed, and so didpeak commit: n/a MBandexit: 0xc0000005. The PR's own block now has to show all four lines with real values. Main's block is unchanged, because its run may have crashed (#1506).Fixes #2213
What is in it
scripts/pr_check.py: the PR's block needsdevice removals,crashes,exitandpeak commit(PR_SMOKE_FIELDS), in the formsmoke.ps1prints them (PR_SMOKE_FORMS): the counters as plain integers,peak commitas<n> MB.number()reads only leading digits, so1.5 GBwas 1 and3,000 MBwas 3. Anexitother than0x0is a problem:killed (no exit)keeps its message, anything else gets "ended with exit …".seconds: 0fails in either block, andframes shown: 0andpeak commit: 0 MBfail in the PR's: the comparisons treat 0 as no value and skip themselves. The memory comparison still skips a main block whosepeak commitis not a number.scripts/test_pr_check.py: aCLEAN_RUNfixture with the linessmoke.ps1prints, used by the existing two-blocks test. New tests: a clean PR block passes; each of the four lines missing fails; malformed values fail (crashes: none/0x0,device removals: n/a/0.0,peak commit: n/a MB/1.5 GB/3,000 MB); zeroseconds,frames shownandpeak commitfail;exit: 0xc0000005andexit: killed (no exit)fail; and a main block without these lines still passes.Open PRs whose
test_pr_check.pyfixtures leave these lines out of the PR's block (#1750, #2039) will need them added when they are rebased onto this.Tested
python -m unittest discover -s scripts -p test_pr_check.py: 19 tests, OK. Withscripts/pr_check.pyfrommainand the new tests: 13 subtests fail (the missing lines, the malformed values, the zeros and the crash exit). The otherscripts/test_*.pyfiles pass.scripts/pr_check.pyon D3D12.X: binds go on without big compute programs that write only images #2176's description (a real pair ofsmoke.ps1blocks) with a runtime file:description ok, the same asmain's checker.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4on8d99ad3(base568e7db; it merges intomainf087b99without conflicts): 1154 passed, 0 failed, 46 ignored. 24 SKIPPED: no wave64, the per-lane refusals, no heap windows.Regression run
scripts/only, with no runtime files.Not tested
PR checksworkflow on GitHub with this script, until it runs on this PR.AI use
🤖 Generated with Claude Code