ci: fail when a test skips that the job's device is not expected to skip #1028
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1028"
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 boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T01:53:11Z.
What
Closes #1012.
The hole
Both jobs report a full pass while a large part of the suite does not run:
100% tests passed out of 371100% tests passed, 0 tests failed out of 368On Linux the 20 are
agc_driverexecution tests that need a wave wider than llvmpipe's subgroup size 8. On Windows it is 143 of the 147 GPU execution tests: the runner has no Vulkan driver,ANYPS5_REQUIRE_VULKANis not set on that job, so they exit 77 and ctest counts a skip as a pass.A test that exits 77 is reported
***Skippedand ctest still exits 0, so a change that makes one more test device-dependent loses its coverage silently while both jobs stay green.What this does
tools/check_skips.pyreads the file ctest writes with--output-junitand fails when a test skips that is not expected:agc_drivertests measured on the CI device, plusagc_driver_conservative_rasterization, which reports the device has noVK_EXT_conservative_rasterization;agctest, because the runner has no Vulkan driver at all —agc_driver, theagc_driver_*execution tests andagc_shader_*; a skip of anything else fails.An expected skip that no longer happens is a
note:, not a failure, so the sets stay current as the images change (a device gaining coverage must not break CI).Both jobs now pass
--output-junitand run the check after ctest:The JUnit file is the reason for the shape: it needs no redirection, so the console output stays visible and no pipe can turn a failing ctest into a passing step. (
pythonon the Windows job, which is what the release workflow already uses there;python3on Linux.)Notes for review
--output-junitneeds CMake 3.21 or newer. Both runners are well past that, and the file is ~240 KB.ANYPS5_REQUIRE_VULKANis deliberately left unset: setting it would turn those 143 skips into failures with no driver installed. This change makes the situation visible rather than changing it.LP_NATIVE_VECTOR_WIDTH=1024makes llvmpipe report subgroup 32, so those 20 Linux tests run — but they then fail on a wrong lane value (lane 16 result 0 is 3038057749, expected 2768569605), while a real subgroup-32 GPU passes them. The skip is a driver limitation, so the guard is the right answer rather than a device change.tools/check_skips.py --listprints what a file contains, for updating a set.AI-assisted: yes.
Tested
Run here with the CI command and the CI device (
llvmpipe (LLVM 23.1.1, 256 bits) subgroup=8,ANYPS5_REQUIRE_VULKAN=1,GALLIUM_OVERRIDE_CPU_CAPS=avx):agc_driver_conservative_rasterization(noVK_EXT_conservative_rasterization)1 test(s) skipped, all expected— exit 0agc_driver_look_back_scan1 test(s) skipped, all expected— exit 0error: … skipped— exit 1agc_driver,agc_shader_fusion,agc_driver_foo, with--job windows3 test(s) skipped, all expected— exit 0agcskiperror: … skipped— exit 1The Windows case is exercised against a file built from that job's own log, which is why the rule is a prefix and not a list — a new GPU test should not fail that job. The Linux rule is a reason match rather than a name list: the first CI run of this branch failed on
agc_driver_conservative_rasterization(run 37820232450), which skips because the device lacksVK_EXT_conservative_rasterization, not because of its subgroups — the rule now accepts either.Verified locally today on the rebased head, with the CI command and the CI device:
build/ctest.xmlfromctest --test-dir build --output-junit ctest.xml:0 test(s) skipped, all expected— exit 0;error: guest_foo skipped ... the job lost that coverage and ctest still reports every test as passed— exit 1;--job windowswith anagc_driver_*skip: exit 0; with a non-agc_driverskip: exit 1;--listprints the skipped test and its reason.build/ctest.xml, which is the path both guard calls read (an--output-junitpath resolves against--test-dir).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T03:07:55Z.
I have extended this to the Windows job, because it turned out to be the larger half of the same problem.
That job reports
100% tests passed, 0 tests failed out of 368while 143 of its 147agc_driverexecution tests are skipped: the runner has no Vulkan driver andANYPS5_REQUIRE_VULKANis not set there, so they exit 77 and ctest counts them as passes. Only 225 of the 368 tests actually run.So the check now covers both jobs:
agc_drivertests this device cannot run;agc_drivertest — a prefix rule rather than a list, so adding a GPU test does not fail that job — while a skip of anything else is an error.Two other changes while I was in there:
ctest --output-junitinstead of the console log. That removes theset -o pipefail | teefrom the previous version entirely: the JUnit file needs no redirection, so the console output stays visible and no pipe can turn a failing ctest into a passing step.pythonon the Windows job (which is what the release workflow already uses there) andpython3on Linux.Both directions verified: the real Linux run reports 20 skipped, all expected; a file with 143 Windows-style
agc_driverskips passes with--job windows; and one unexpected skip in either exits 1.One thing that may save someone the experiment:
LP_NATIVE_VECTOR_WIDTH=1024makes llvmpipe report subgroup 32, so those 20 Linux tests run instead of skipping — but they then fail on a wrong lane value (lane 16 result 0 is 3038057749, expected 2768569605) while a real subgroup-32 GPU passes them. The skip is a driver limitation, so the guard is the right answer rather than a device change.Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T03:17:48Z.
The first run of the extended version failed both jobs, and the cause is worth recording:
ctest --test-dir build … --output-junit ctest.xmlwrites the file relative to--test-dir, so it lands atbuild/ctest.xml, not at the workspace root. The guard now reads that path in both jobs:I had verified the guard against a file I generated with an absolute path, so the relative form never got exercised — that is the miss, and it is fixed by running the exact CI steps this time:
20 test(s) skipped, all expected— exit 0agc_driverskips143 test(s) skipped, all expected— exit 0agc_driverskip in the windows fileNothing about the change itself was wrong; the path was.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T05:39:30Z.
Review: APPROVED
Looks good: the JUnit file avoids the pipe problem, and an expected skip that starts running is only a note. I reproduced the
LP_NATIVE_VECTOR_WIDTH=1024result on CI's lavapipe (Mesa 25.2.8): 18 of the 20 fail and 4 of those segfault (e.g.wave32 subgroup: thread 16 v_mbcnt_lo_u32_b32 is 0, expected 16), so a forced wide llvmpipe is not usable and the guard is the right fix.Suggestion, not blocking: as it stands, every shader PR that adds a wave32 test has to edit
EXPECTED_LINUXtoo, or the Linux job fails. The JUnit file includes each test's output in<system-out>, and these tests print why they skip (subgroup size 8 cannot hold a wave32). The check could accept a Linux skip only when that reason is present, which removes the list and still fails on any other kind of skip. Your call.Nit:
tools/check_skips.pyhas no newline at the end.Follow-up on our side: a separate PR to install lavapipe on the Windows runner, so most of those 143 tests run there too. Your Windows rule will then be tightened.
@boykopovar this adds a CI rule that CONTRIBUTING doesn't mention (an unexpected skip fails the job), so I'm leaving the merge to you.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T11:19:26Z.
Thanks for the review, and for reproducing the wide-llvmpipe result independently — 18 of 20 failing with 4 segfaults is a stronger result than the one test I had measured, and it settles that the guard is the fix rather than a device change.
Both points are in:
The suggestion — done, and it works. The Linux rule no longer has a list. A skip is expected only when the test's own output reports that the device's subgroups are too narrow for it:
The wording is not uniform across the 20 — there are four phrasings in the file today (
subgroup size 8 cannot hold a wave32,the device's subgroups are narrower than a wave (8 lanes),the device runs wave32 programs on 8-wide subgroups,subgroup size 8 cannot hold a wave64 in two lanes), so the rule matches the shared part rather than one string.Verified both ways:
20 test(s) skipped, all expected— exit 021 test(s) skipped, all expected— exit 0no writable temporary directory)error: … skipped— exit 1agc_driverskips with--job windows143 test(s) skipped, all expected— exit 0agc_driverskipSo a shader PR adding a wave32 test no longer touches anything, which was the point.
The nit — fixed.
tools/check_skips.pynow ends with a newline.On your follow-up: installing lavapipe on the Windows runner would be the better half of this — 143 of 147 GPU tests running there instead of skipping. The Windows rule is a prefix (
any agc_driver_*) precisely so it does not need a list to tighten; when those tests start running, the rule stays correct as long as what skips is stillagc_driver_*, and--listprints what a file contains if it needs narrowing.Noted on the merge being @boykopovar's call.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T19:52:39Z.
Status, since @adriadam10 left the merge decision here: this is approved, green on both platforms, and
MERGEABLE/CLEAN. The one thing I believe is still open is his note that it introduces a CI ruleCONTRIBUTING.mddoes not mention.Offer: say the word and I will add that line to
CONTRIBUTING.md— in this PR or as a separate one-liner, whichever you prefer — so the rule is written down where contributors will actually see it instead of only living in the workflow.What it does, for the decision:
ctest --output-junitand runtools/check_skips.pyafterwards;agc_driver_*may skip (the runner has no Vulkan driver, so 143 of 147 GPU tests skip there today); a skip of anything else fails the job;No library behaviour changes and no source changes — it only makes coverage that is currently skipped in silence visible. Measured here with the CI command on the CI device: 20 Linux skips all expected, 143 Windows-style skips all expected, and one unexpected skip in either exits 1.
If you would rather not carry a new rule, closing this is a fine outcome — but then the two jobs should say somewhere that they skip a third of the suite, because today they both report a full pass.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-07T23:56:49Z.
@boykopovar — a nudge on the single open question here, since @adriadam10 left the merge to you: this adds a CI rule
CONTRIBUTING.mddoes not mention (an unexpected skip fails the job). All three answers work for me:CONTRIBUTING.mdline, in this PR or as a separate one-liner, whichever you prefer;No code change is pending: it is approved, green on both platforms, and
MERGEABLE/CLEAN.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T05:33:02Z.
Re-checked the current head: the guard fails on an unexpected skip (a skip without a "subgroup" reason on Linux, any non-
agc_driver_skip with--job windows) and passes on the expected ones, and both jobs are green.The only open point is policy: an unexpected skip now fails CI, and CONTRIBUTING.md doesn't mention that rule. @boykopovar, do you want to keep it? If yes, the author offered to add the CONTRIBUTING line here or in a one-liner; if not, this should be closed. No code change is pending.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T17:59:17Z.
Rebased onto current
mainand rewrote the body to the PR template — this one had never had CI run, so the body failure was invisible until now.What changed and why
mainhas since added--parallel 4and the registration check; the resolution keepsmain's flags and adds this PR's--output-junit ctest.xml, then the guard step, in both thelinuxandwindowsjobs. YAML validates and each job has exactly one guard step.### What/### Tested/### Checklist, with the boxes ticked,Depends on: noneandAI-assisted: yes.python3 tools/check_conventions.pynow passes locally and theconventionsjob is green.check_skips.py ctest.xml; the diff writes and readsbuild/ctest.xml(--output-junitresolves against--test-dir), so the snippets now saybuild/ctest.xml.Guard verified here, including a real skip rather than only synthetic XML
and in the other direction: one skipped test whose output does not report narrow subgroups fails with
error: … skipped/ "the job lost that coverage and ctest still reports every test as passed", exit 1 — on--job linuxfor a non-subgroup reason, and on--job windowsfor a non-agc_drivername. So the Linux job should accept the 20 real subgroup skips and the Windows job the 143agc_driverones.Checks on this head:
conventionspass,relinkerpass on ubuntu/windows/macos,changespass,linux/windowsrunning.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T18:15:15Z.
The first CI run of this branch failed both Build jobs — in the new guard step, which is the guard doing its job: it caught skips that ctest reports as passes. The rules for "expected", though, were narrower than the JUnit file the jobs actually produce.
What the jobs reported
Why. The Linux rule accepted only a narrow-subgroup reason, and the real CI skip reports a missing extension instead:
reproduced here under the CI device, so it is the same reason the job hit. The Windows rule accepted only
agc_driver_*, but that job's file also carriesagc_driveritself andagc_shader_fusion.Fix, pushed as
1ea58302. A skip is expected when it reports a device limitation (subgroups, or a missing extension) on Linux, and when it is anyagctest on Windows, where the runner has no Vulkan driver at all. Verified against every case CI produced:The description and the body are updated to match: the Linux rule is a reason match rather than a name list, which is why a device that gains the extension does not fail the job, and the Windows rule is the
agcprefix rather than a list so a new GPU test does not fail it either.Worth noting for review: the earlier "the real Linux run, 20 skipped, all expected" line in this body came from a local run; the CI file is the authority, and it disagreed on one test. That is the failure this guard exists to surface.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T20:46:14Z.
The implementation is approved and the checks on this head passed, but the PR is currently
DIRTY. Comparing head1ea5830with currentmainaa277b3shows the branch has diverged (2 commits ahead, 92 behind); it is based on2b29784, and it edits.github/workflows/build.yml. Please rebase onto currentmainand rerun the checks before merge. I am not deciding the open CONTRIBUTING policy question; that still needs the maintainer decision already requested in the thread.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T20:52:41Z.
New integration point to account for when rebasing: open PR #1811 registers
agc_driver_meshand skips it on llvmpipe withMesh tests skipped: llvmpipe fails to compile the mesh programs. Your current LinuxDEVICE_LIMITATIONmatcher does not accept that known compiler limitation, so the guard will fail on the combined heads if #1811 lands. Please coordinate with that author/reviewer on a narrow explicit allowance while preserving failure for other unexpected skips.Imported from boykopovar/AnyPS5. Originally posted by gerardlesan on 2026-10-08T21:45:12Z.
@Dextroid17, about the note above on #1811: no allowance is needed. #1811 now prints
skipped, the device has no mesh shader compiler that handles these programs (llvmpipe)when it skips on llvmpipe, and yourDEVICE_LIMITATIONmatcher accepts it as it stands. Checked withtools/check_skips.pyfrom1ea58302on that test'sctest --output-junitfile:1 test(s) skipped, all expectedon the Linux job's lavapipe (Mesa 25.2.8), and with--job windowswithout a device. The two PRs change no common file.Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T11:19:11Z.
Noted — and with the rule resolved (no allowance needed, and a device that cannot run the workload now reports
skipped, the device has no mesh shader compiler…instead of skipping silently) I have rebased this onto currentmain.The rebase took main's restructured CI as-is and kept only what this PR needs: the
--output-junit ctest.xmlargument on both platforms, sotools/check_skips.pyhas a JUnit report to read. The workflow still parses (eligibility, relinker, linux, windows).Head
ad1c3924is MERGEABLE withconventionsandeligibilitygreen; the heavy jobs are eligibility-skipped on a fork, which is why the Fork Build line comes back without them. Ready to review whenever you have a moment — and thank you for resolving the rule question rather than leaving it open.Written with AI assistance.