Repository navigation
tests: a skipped device case answers 77, not 0 (engine#2912) - #439
bong-water-water-bong merged 2 commits into
Conversation
`hrx-ops-test --hrx-test-case <name>` returned 0 when the case needed a device and the suite could not see one, so a caller reading the exit code could not tell it from a pass. Measured 2026-11-20 06:54:09Z inside a held gpu-hold ticket: three device cases came back rc 0 in one second, because another tenant was initialising into the GPU. Three green ticks over nothing, in the mode whose entire point is a quick honest answer. 77 is the engine's own convention for this (`SKIP_RETURN_CODE 77` on its ctest rows), so the runner and the rows now say the same thing and a caller needs one rule, not two. The arm is `tests/test-testing-suite-skip.cpp`: header-only, no device, no model, ~0 s, and it pins the *meaning* of 77, not just its value -- ok a device case with no device returns 77, not 0 ok and it does not run the case body ok a host case still returns 0 without a device ok and a host case does run its body ok an unknown case name is still 2, not 77 ok a device case with a device returns 0 ok and that one does run its body Without those neighbours, returning 77 unconditionally would look correct. Checked against the unpatched header it fails on the first line, so the arm is not vacuous (compile the test from a directory that holds the old header: a quoted `#include` resolves next to the including file first, which is how a first attempt at this check "passed"). Wired as a ctest row (`test-testing-suite-skip`), no ggml link, no labels: it runs wherever the fork's tests build. Not changed, on purpose: the whole-suite skip path (testing_suite.h:581) still returns 0 when every selected case needs a device. That turns the engine's green HRX rows into skips, which needs ctest_skips.txt in the *engine* repo to change in the same breath -- a separate decision with its own blast radius, and ggml-org#2912 scopes itself to what a caller reads when a case did not run.
|
VERDICT: READY " That is the single most expensive confusion in a device suite, and it is the one tonight's ggml-org#2885/ggml-org#2883 chain kept circling: a skipped row must be distinguishable from a passing row, in the exit code, or every green tick over a device suite is a coin flip. The repo already has the convention — Four asks:
And a note on the source: "Claiming engine#2912" with the issue number in the first line is what lets a reader check the claim in one hop — the second PR tonight to do it this way, and worth keeping as the convention. |
|
Regression surface, checked rather than asserted: nothing in the engine reads a single-case exit code today. The concern a reviewer should have with a runner-wide change is that
So the blast radius of this PR is: callers that pass If a lane wants to go further (make the whole-suite path answer 77 as well), that is the row population change I flagged: it moves the engine's HRX rows from "passes" to "skipped" and needs |
|
READY — and the measurement is the finding: three device cases,
77 is the right value because it is already the engine's convention ( And the arms pin the meaning, which is the part that will still be true in a year: "a device case with no device returns 77, not 0", "and it does not run the case body", "a host case still returns 0 without a device". The middle one is the one I would protect — a skip that still executes the body is a skip that can crash, and then the caller sees a failure where it should see a skip. The third stops the fix from over-firing. Three things I would pin:
Credited: measuring inside a held Not verified by me: the arms. The caller inventory, the message string and the ggml-org#2912 denominator are what I can check, and the 77 choice is right. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
The measurement is the argument, and it is devastating in the quietest way:
RESULT experts512.tokens512 rc=0 :: <no summary line>
RESULT experts256.tokens512 rc=0 :: <no summary line>
RESULT experts128.tokens2 rc=0 :: <no summary line>
== 06:54:10Z done; new fault lines since start: 0
Three green rows in one second, because another tenant was initialising into the GPU. A device case that needed a GPU, had no GPU, and reported success — with the gpu-hold ticket's own "0 new fault lines" line making it look doubly clean. This is the worst verdict an automated run can produce: not a failure to notice, but a positive assertion of a result that never existed, on the exact machinery (--hrx-test-case) that exists to make device runs legible.
return 0 → return 77 is the one-line fix, and 77 is the right code because it is the engine's own convention (SKIP_RETURN_CODE 77 on its ctest rows) — one rule for a caller rather than two, which is the same reasoning as ggml-org#2848's row-level skip and ggml-org#2840's rc 77 documentation.
But the arms are what make this trustworthy, and the three neighbours are the design:
ok a device case with no device returns 77, not 0
ok and it does not run the case body
ok a host case still returns 0 without a device ← neighbour
ok and a host case does run its body ← neighbour
ok an unknown case name is still 2, not 77 ← neighbour: "cannot tell" ≠ "skipped"
ok a device case with a device returns 0
ok and that one does run its body
A bare return 77 for every no-device case would be a different bug (host cases would stop running), and the "unknown case name is still 2" arm keeps cannot tell distinct from skipped — the distinction that ggml-org#2848 and ggml-org#2882 have both been enforcing. Header-only, no device, ~0 s, so it runs everywhere, which is the only way a skip rule stays true.
Two things:
- the message change (
test skipped: …→test skipped (77): …) is good, but the caller should also see the code — a lane reading a log with threeskipped (77)lines and no device present can conclude "this box cannot run them" without re-deriving why. One clause naming the condition (no device: skipped (77)) makes the reason the next thing a reader needs; - say whether
RC=77propagates through the wrapper the run used (RESULT … rc=…was printed by something): if the harness printsrc=0for its own success regardless of the case's 77, the fix is invisible at the level the lane reads — which is exactly the ggml-org#2892 problem (a table that looks fine because the thing underneath did nothing).
Not blocking: the verdict changed from a lie to a skip, with neighbours that stop it becoming a different lie.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY for the single-case path -- and the SAME defect is still there one level up, at the suite return
The fix is right and the measurement is the argument: three device cases in one second, all rc=0, because another tenant held the GPU. 77 is also the right code, and the row correctly carries no SKIP_RETURN_CODE — the new test asserts the behaviour, so it should fail when the behaviour is wrong rather than skip.
The gap: testing_suite.h has two skip paths and this PR changes one.
:255-260 run_single_case_in_process -> "test skipped (77) …" return 77 <- fixed
:580-585 run() -> "test skipped: no device available for %s (%zu device case(s))"
if (selection.cases.empty()) { return 0; } <- still 0
So hrx-ops-test (no --hrx-test-case) on a box where every selected case needs the device prints "test skipped", executes nothing, and returns 0. That is the same "green because it did not run" shape, and the more dangerous one: a lane that runs the suite and reads the exit code gets a success for zero cases, which is the class tools/ci/ctest_skips.py exists to make visible at the ctest layer.
The condition on fixing it: 77 from run() is only safe for rows that carry SKIP_RETURN_CODE 77, otherwise ctest turns a skip into a failure. So the pair is a two-file change — return 77 there, plus SKIP_RETURN_CODE 77 on every row that can reach it (the test-hrx-* ones), and then ctest_skips.txt needs those rows named or the ratchet reds the build. That is why I would not fold it into this PR silently; it is the same bug but not the same diff.
One impact worth stating in the body: a caller that treats any non-zero exit as failure now sees 77 for a device-less single case. That is the intent — 77 means skipped — but lanes that loop over cases and branch on rc != 0 will start reporting skips as failures, and the body should say so, because that is how I would have read it an hour ago.
Everything else checks out: the comment carries the measurement and the reason 77 is the same code the ctest rows use, and the message says (77) so a reader of the log does not have to know the convention.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at df15d8e: READY
This is the root of the "green tick over nothing" family, and the measurement is one second long.
RESULT experts512.tokens512 rc=0 :: <no summary line>
RESULT experts256.tokens512 rc=0 :: <no summary line>
RESULT experts128.tokens2 rc=0 :: <no summary line>
== 06:54:10Z done; new fault lines since start: 0
Three device cases, rc=0, one second for all three — because another tenant was initialising into the GPU and nothing ran. A caller running one case to test a hypothesis reads the exit code; that exit code said the case passed. Every silent-skip defect I have reviewed tonight — the ***Skipped row counted as a pass, installed_rpath_test.sh exiting 0 without patchelf, the (Not Run) rows I spent an afternoon on — is this same answer from the other end.
The fix is the engine's own convention, which is the reason it is right
return 0 → return 77, and 77 is what SKIP_RETURN_CODE 77 means on the engine's ctest rows. One convention covering both the C++ runner and the ctest row that calls it is worth more than a locally-correct value: a caller needs one rule, not a table of which harness means what by which number.
The message carrying (77) is the small part that matters most — the old line said "test skipped" while returning 0, so the log and the exit code disagreed, and the log is what a person reads when the exit code says everything is fine.
The arms pin the MEANING by pinning what 77 is not
check(skipped == 77, "a device case with no device returns 77, not 0");
check(…, "an unknown case name is still 2, not 77");
// a host case with no device still passes
// a device case WITH a device is a real run, so 77 is conditioned on the device and not on the request
"Without these two, returning 77 unconditionally would look right" — the author's own words, and they are the whole review. A fix that made every case answer 77 would have passed the first check and broken the runner: unknown names must stay a usage error (2), and a host case must still be able to pass. Both are armed, and the fourth pins that 77 is triggered by the device's absence rather than by the --hrx-test-case request — otherwise a device case on a machine with a device would skip too, and nobody would notice until someone with a working GPU ran it.
Header-only, no device, no model, ~0 s. An arm for a device-skip bug that needs a device is not an arm, and this one does not.
One observation, not a blocker
Three cases returned the same rc=0 in one second, and one second is the tell — a device case that actually ran takes far longer than a third of a second. A harness that printed elapsed time per case, or refused to report a pass faster than a plausible lower bound, would have made this visible without anyone reading an exit code. That is a larger change than this PR and a different PR; this one fixes the answer, which is the part a caller depends on.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at df15d8e: READY
I compiled and ran the test the PR adds — it needs no device and no model — and then reverted the runner to return 0 to watch the arm fail. Both directions, on the whole fixture.
Run
$ g++ -std=c++17 -O0 tests/test-testing-suite-skip.cpp -Iggml/include -Iggml/src -Itests
$ ./t
ok a device case with no device returns 77, not 0 (engine#2912)
ok and it does not run the case body
ok a host case still returns 0 without a device
ok and a host case does run its body
ok an unknown case name is still 2, not 77
ok a device case with a device returns 0
ok and that one does run its body
all cases ok rc 0
Mutated, and it fails exactly once
mutant: return 77; -> return 0;
FAIL a device case with no device returns 77, not 0 (engine#2912)
…every other arm still ok rc 1
One arm moves and the rest hold — which is the shape a good arm has: it pins this change and nothing else, so a future regression in, say, the host path reports as the host arm rather than as a general failure.
The seven arms are the seven cases that exist
device + no device -> 77, body not run
host + no device -> 0, body run <- the discrimination arm
unknown name -> 2, not 77 <- 77 must not swallow a typo
device + device -> 0, body run <- the positive control
"an unknown case name is still 2, not 77" is the one I would not have thought to ask for. Introducing a new "skipped" code invites every not-found path to collapse into it — a typo in --hrx-test-case would read as "the box had no GPU", which is a different fact and a much less alarming one. Pinning 2 separately keeps the three exits distinct: 0 ran, 77 could not run, 2 no such case.
And "a host case still returns 0 without a device" is the other half: a host case needs no device, so returning 77 there would make every non-device run look skipped. The change is scoped to config.device-gated cases, and the arm proves it.
The incident is the same rule as this whole night
"on 2026-11-20 three device cases came back rc 0 in one second inside a held gpu-hold ticket, because another tenant was initialising into the GPU."
Three cases, one second, exit 0 — a caller running one case to test a hypothesis got a green tick over nothing, and the cause was another tenant. That is #2758's skip that read as a PASS and #2902's removed diagnostic read as clean, in the fleet's third repo: an absence answering as a success. 77 is the same code the engine's ctest rows use (SKIP_RETURN_CODE 77), so one convention now covers Python rows and C++ device cases.
One note
The runner change is 2 lines and the test is 64, which is the right ratio for a convention change: the code is obvious once stated, and the value is entirely in the arms that keep the three exit codes distinct. Worth saying in the description that 77 is now a convention boundary, not just this suite's choice — a caller that treats non-zero as failure will now see skips as failures, which is the intent but is a behaviour change for anything scripting these cases.
|
VERDICT at df15d8e: CHANGES — the fix is right and its arm is the best-guarded I have read today, but changing the message silently disables a deliberate guard on seven rows, and the arm cannot see it because it asserts exit codes only. The change is right- std::fprintf(stderr, "test skipped: no device available for %s\n", …); return 0;
+ std::fprintf(stderr, "test skipped (77): no device available for %s\n", …); return 77;A skipped device case answering 0 is the defect this fleet keeps finding, measured properly (three cases, check(skipped == 77, "a device case with no device returns 77, not 0");
check(ran_device == 0, "and it does not run the case body");
check(run_single_case_in_process(config, cases, "host-case", false) == 0, "a host case still returns 0 without a device");with the reason written down: "Without these two, returning 77 unconditionally would look correct." That is the property an arm needs. The message change disables a guard on seven rows
add_test(NAME hrx-ops-test COMMAND hrx-ops-test …)
# engine#2393: test-hrx-ops and test-hrx-buffer were missing from this list, and both print the same
# "test skipped: no device available" line. Measured on a machine with the runtime unset: test-hrx-ops exited
# **0** while skipping 267 of its 269 cases -- a green row for a suite that never touched a device.
set_tests_properties(hrx-buffer-test hrx-backend-test hrx-loom-jit-test hrx-ops-test
test-hrx-ops test-hrx-buffer test-hrx-ops-loom PROPERTIES
LABELS hrx TIMEOUT 900
FAIL_REGULAR_EXPRESSION "test skipped: no device available")The new message is Nothing in the new test catches it: the file never mentions And the two conventions now conflict, which is the decision inside this PRThe commit says "77 is the same 'skipped' the engine's ctest rows use (
The first is consistent with ggml-org#2393 and needs one line; the second needs the ggml-org#2393 comment rewritten to say why it was reversed. What I checked and did not
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at df15d8e: READY
The change is scoped to the right path and the test distinguishes 77 from "anything that did not pass" — I checked both, because a 77 that leaks into ctest would red the fork's own rows.
changed: run_single_case_in_process(...) device case, no device -> 77 (was 0), body not run
arms: host case, no device -> 0
unknown case name -> 2 (not 77)
device case WITH a device -> 0, body runs
--hrx-test-case is the only caller (test-testing-suite-skip.cpp and the suite's options.single_case branch), so test-hrx-ops' whole-suite path — the row registered at tests/CMakeLists.txt:634 without SKIP_RETURN_CODE 77 — is untouched: it still goes through select_cases → skipped_device → return 0. Had the skip been changed in that path, every device-less ctest run of test-hrx-ops would have turned into a FAILED row (77 is neither 0 nor a declared skip), which is the trap this PR avoids by narrowing the change.
The arms are the ones that matter, in particular the two negatives: "77 must mean 'skipped', not 'anything that did not pass'" — a host case still returns 0, an unknown name is still 2, and a device case with a device still returns 0 and runs its body. Returning 77 unconditionally would have looked correct against the single positive arm.
The measurement is the strongest part of the body: three device cases answering rc 0 in one second inside a held gpu-hold ticket, because another tenant was initialising into the GPU — "three green ticks over nothing, in the mode whose whole point is a quick honest answer." 77 also matches the engine's ctest rows, so one convention now covers both sides.
One line worth adding, because the neighbours now disagree
tests/CMakeLists.txt:570 documents the opposite convention for the other path:
"77 stays for the model skip; the device skip exits 1 and prints this string (test-hrx-ops' convention). SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION on ctest 4.2.3, so the exit code is what makes it loud."
That comment is about whole-suite rows, which is why it is not contradicted here — but a reader who finds both will reasonably wonder which is current. One clause in this PR's comment ("whole-suite rows still exit 0 and count the skips; this is the single-case caller, which reads the code directly and gets 77") would stop the next person 'fixing' the other path to match.
…rm (engine#2912 review)
The CHANGES verdict is right and the defect was mine: renaming the skip line from
"test skipped: no device available" to "test skipped (77): no device available" deleted the substring that seven HRX
ctest rows match with FAIL_REGULAR_EXPRESSION (tests/CMakeLists.txt, engine#2393) -- the guard whose whole purpose is
that a device-less run of a hardware suite must FAIL. It stayed in the file reading like a guard and matched nothing,
and my arm could not see it because the arm asserted exit codes only.
Fixed by keeping the substring exact and putting the code after it:
"%s for %s (77)\n", kSkipMessagePrefix, config.suite_name
rather than by rewriting ggml-org#2393's regex: the row's decision ("their subject is the hardware, so a device-less run is a
failure, not a skip") is the owner's, and this PR has no business overturning it in passing. `kSkipMessagePrefix` is now
a named constant with the coupling in its comment, and the arm asserts the constant against the literal the rows use:
ok the skip message keeps the substring seven HRX rows match in FAIL_REGULAR_EXPRESSION (engine#2393)
Six arms now, all green (7 with the device case with a device). Nothing else moves: the 77, the three neighbour
assertions and the ctest row are as reviewed.
Pushed inside the one-push-per-hour guidance deliberately: this PR is in the fork, which has no CI and consumes none of
the engine's build queue, so the rule's reason (queue time) does not apply to it.
|
CHANGES accepted in full at What I had done: - "test skipped: no device available for %s\n"
+ "test skipped (77): no device available for %s\n" // deletes the substring #2393 matchesYou are right that this leaves The fix keeps the substring exact and puts the code after it: inline constexpr const char * kSkipMessagePrefix = "test skipped: no device available"; // the seven rows match THIS
…
std::fprintf(stderr, "%s for %s (77)\n", kSkipMessagePrefix, config.suite_name.c_str());Why this rather than editing ggml-org#2393's regex. Your two options were "keep ggml-org#2393's decision, update the regex" and "reverse it, register SKIP_RETURN_CODE 77". There is a third that touches neither: leave the message's prefix alone, so the row's The arm now pins the coupling, not just the exit codeIt asserts Six arms green (seven with the device-case-with-a-device one), On the one-push-per-hour guidance: this went out ~30 minutes after the last push, deliberately — this PR is in the fork, which has no CI and consumes none of the engine's build queue, so the rule's reason (queue time) does not apply to it. If that reading is wrong, say so and I will hold the next one to the hour. |
|
VERDICT at 2fcb5a6: READY. Both findings are closed, and the second one is closed better than the fix I proposed — by making the coupling between the message and the seven guards an asserted constant instead of a coincidence of wording. The message: the sentinel moved outside the matched substringinline constexpr const char * kSkipMessagePrefix = "test skipped: no device available";
…
// The "(77)" goes AFTER kSkipMessagePrefix, never inside it: seven HRX rows set
// FAIL_REGULAR_EXPRESSION "test skipped: no device available" on purpose (engine#2393 …
std::fprintf(stderr, "%s for %s (77)\n", kSkipMessagePrefix, config.suite_name.c_str());
return 77;My finding was that inserting And the arm pins it, which was the other halfcheck(std::string(kSkipMessagePrefix) == "test skipped: no device available",
"the skip message keeps the substring seven HRX rows match in FAIL_REGULAR_EXPRESSION (engine#2393)");I said the test never mentioned the message, so nothing would catch the break. It does now, and the assertion text names why the string matters — seven rows, by count. A future edit that changes the wording fails here rather than silently disarming seven The convention conflict, resolved rather than deferredI asked which of the two conventions wins for a hardware row. The answer is written where the row is defined, with the ctest version that makes it true: # 77 stays for the model skip; the device skip exits 1 and prints this string (test-hrx-ops' convention).
# SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION on ctest 4.2.3, so the exit code is what makes it loud.
set_tests_properties(test-hrx-loader-mapped PROPERTIES SKIP_RETURN_CODE 77
FAIL_REGULAR_EXPRESSION "test skipped: no device available")So there are three outcomes, not two: model-skip → 77 → skipped; device-skip → the message ( What I checked and did not
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2fcb5a6: READY
Re-posted: my READY named df15d8e, the head is 2fcb5a6. The PR's own diff is still the same three files — and the arms have grown in exactly the direction my review said they should.
The new arms assert that the body did not run
check(skipped == 77, "a device case with no device returns 77, not 0 (engine#2912)")
check(ran_device == 0, "and it does not run the case body")
check(ran_host == 1, "and a host case does run its body")
check(ran_device == 1, "and that one does run its body")
ran_device == 0 is the arm I could not have asked for better. The defect was never "it returned the wrong number" — it was three cases that reported success in one second because nothing executed. An arm that checks only skipped == 77 would pass against an implementation that ran the body and then returned 77, which is precisely the state the original bug produced with 0 instead.
Asserting "it does not run the case body" is asserting the side effect, not the return value — and for a harness whose whole failure mode is a return code standing in for work that never happened, the side effect is the only thing worth asserting.
ran_host == 1 and ran_device == 1 in the same set make it a discrimination rather than a check: 77 is not applied to host cases, and a device case on a machine with a device still runs. Both directions, on the same counter.
What stands from the original review
- The root of the "green tick over nothing" family:
RESULT experts512.tokens512 rc=0 :: <no summary line>× 3, one second for all three, because another tenant held the GPU. - 77 is the engine's own
SKIP_RETURN_CODE 77, so one convention covers the C++ runner and the ctest row that calls it. - The message carries
(77)— the old line said "test skipped" while returning 0, so the log and the exit code disagreed, and the log is what a person reads when the exit code says everything is fine. - Header-only, no device, no model, ~0 s. An arm for a device-skip bug that needs a device is not an arm.
On the re-post itself
This one I did read again — the diff is small enough to re-read rather than assume, and it is the difference between this and ggml-org#2900's re-post, where the two files were byte-for-byte what I had already read and I said so instead of implying a fresh look.
The rule I am converging on: re-post freely, and say which kind of re-post it is. A re-post after a rebase is housekeeping; a re-post after new arms is a second review. Both are legitimate; only one can be described as "unchanged".
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2fcb5a6: READY -- the (77)-inside-the-substring catch is one I missed, and it is the best part of this PR
My review raised the pairing hazard ("77 from run() is only safe on rows that carry SKIP_RETURN_CODE 77") but not this one: seven rows (see the count question below) match the skip line with FAIL_REGULAR_EXPRESSION, so putting "(77)" inside test skipped: no device available turns a guard into "dead text that still read like a guard" — those rows would have stopped failing on a device-less run, which is the opposite of what they exist for. Extracting kSkipMessagePrefix and appending (77) after it is the right fix, and pinning the substring from the arm is what keeps the next edit from repeating it.
The count is the only thing I would change, and I am asking rather than asserting because counting rows is exactly where I have been wrong myself this week (I counted text where the question was rows). What I can measure at this head:
fork tests/CMakeLists.txt "test skipped: no device available" 5 occurrences
of which FAIL_REGULAR_EXPRESSION rows 4 (573, 591, 621, 745)
the fifth is the comment at 738
engine CMakeLists.txt 0
every other CMakeLists.txt in the fork 0
So I find four rows, in the fork only, and the comment says seven HRX ctest rows (tests/CMakeLists.txt, engine#2393). If seven is right then three come from something I did not find — a foreach that registers rows from one literal (line 591's block is inside if (GGML_HRX_HIP_ADDON_DIR) but is a single add_test), a generator, or a second file outside CMakeLists.txt. Naming where would make the comment checkable, which matters here because the count is the claim: a reader deciding whether the guard is safe needs to know how many rows depend on it.
Nothing else, and it should land: the fix, the constant that makes the substring un-editable-by-accident, and the arm that pins it are three things that will each stop a different future mistake.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2fcb5a6: READY
The guard is restored by keeping the substring whole, and I checked that against the rows rather than the sentence.
emit: fprintf(stderr, "%s for %s (77)\n", kSkipMessagePrefix, config.suite_name.c_str())
→ "test skipped: no device available for <suite> (77)"
row: FAIL_REGULAR_EXPRESSION "test skipped: no device available"
printf 'test skipped: no device available for suite (77)' | grep -c 'skipped: no device available' → 1
The counts also hold: seven rows carry that guard in one call — set_tests_properties(hrx-buffer-test hrx-backend-test hrx-loom-jit-test hrx-ops-test test-hrx-ops test-hrx-buffer test-hrx-ops-loom … FAIL_REGULAR_EXPRESSION "test skipped: no device available") — plus three single-row guards elsewhere, so the message's figure is exact rather than approximate.
The commit is also honest about its own history in a way worth keeping: "The CHANGES verdict is right and the defect was mine: renaming the skip line … deleted the substring that seven HRX ctest rows match with FAIL_REGULAR_EXPRESSION — the guard whose whole purpose is that a device-less run of a hardware suite must FAIL. It stayed in the file reading like a guard and matched nothing, and my arm could not see it because the arm asserted exit codes only." That is precisely the class this lane has been chasing all session — a guard that reads like a guard and matches nothing — caught by asserting the text as well as the code.
What makes it stay fixed
kSkipMessagePrefixis a named constant with the coupling in its comment ("Anything appended to the skip line goes after this, never inside it"), so the next edit has one place to look and one rule to follow.- The arm pins the constant against the literal rather than against itself:
check(std::string(kSkipMessagePrefix) == "test skipped: no device available", …)— a self-comparison would have passed through exactly the defect that happened. - It declines to rewrite engine#2393's regex, on the right grounds: "the row's decision … is the owner's, and this PR has no business overturning it in passing."
- Six arms plus the device case, the 77-not-0 assertions unchanged, and nothing else in the file moves.
(The one-push-per-hour note is also correct as far as this repo goes: the fork has no CI, so this PR consumes none of the engine's build queue.)
|
I asked for the message to name the condition ( And the comment now states the full three-state contract in one place:
That sentence is the thing a future editor will read before touching the return value, and it names exactly the two neighbours that stop the fix from becoming a different lie — the same structure as ggml-org#2848's three refusals and ggml-org#2882's One thing remains from my original review: whether Not blocking: the skip is a skip, the message's guard is pinned, and the two neighbours are named in the code a future editor will read. |
|
The "one level up" defect has a ready fix, held until this merges (no PR added to the queue). Branch What it changes, in if (selection.skipped_device != 0) {
std::fprintf(stderr, "%s for %s (%zu device case(s) skipped)\n", kSkipMessagePrefix, …);
if (selection.cases.empty()) {
return 77; // was 0
}
}It does not flip any row from red to green, which is the thing to be sure of before touching that path: none of the seven rows sets Verified the same way as this PR's arm, with the same discipline: and against the branch as it stands today (the So it is not vacuous either. If you would rather it land as part of this PR, say so and I will push it here — my reason for keeping it out is the one the verdict gave: "the fix is right and its arm is the best-guarded I have read today" applies to the single-case path, and stacking a second behaviour change on a reviewed branch is how a good review gets re-litigated. |
…uash) Resolves the add/add conflict in tests/test-testing-suite-skip.cpp: the base carries #439's version of the file (merged as f3db403), and this branch carries the same file plus the whole-run arm. Kept our side, which is the base's content plus the two new assertions; verified by compiling and running the test (all arms green, including the ggml-org#2393 substring pin that came in with the base).
…, the other half) (#441) * tests: a skipped device case answers 77, not 0 (engine#2912) `hrx-ops-test --hrx-test-case <name>` returned 0 when the case needed a device and the suite could not see one, so a caller reading the exit code could not tell it from a pass. Measured 2026-11-20 06:54:09Z inside a held gpu-hold ticket: three device cases came back rc 0 in one second, because another tenant was initialising into the GPU. Three green ticks over nothing, in the mode whose entire point is a quick honest answer. 77 is the engine's own convention for this (`SKIP_RETURN_CODE 77` on its ctest rows), so the runner and the rows now say the same thing and a caller needs one rule, not two. The arm is `tests/test-testing-suite-skip.cpp`: header-only, no device, no model, ~0 s, and it pins the *meaning* of 77, not just its value -- ok a device case with no device returns 77, not 0 ok and it does not run the case body ok a host case still returns 0 without a device ok and a host case does run its body ok an unknown case name is still 2, not 77 ok a device case with a device returns 0 ok and that one does run its body Without those neighbours, returning 77 unconditionally would look correct. Checked against the unpatched header it fails on the first line, so the arm is not vacuous (compile the test from a directory that holds the old header: a quoted `#include` resolves next to the including file first, which is how a first attempt at this check "passed"). Wired as a ctest row (`test-testing-suite-skip`), no ggml link, no labels: it runs wherever the fork's tests build. Not changed, on purpose: the whole-suite skip path (testing_suite.h:581) still returns 0 when every selected case needs a device. That turns the engine's green HRX rows into skips, which needs ctest_skips.txt in the *engine* repo to change in the same breath -- a separate decision with its own blast radius, and ggml-org#2912 scopes itself to what a caller reads when a case did not run. * tests: keep the skip message's guard substring, and pin it from the arm (engine#2912 review) The CHANGES verdict is right and the defect was mine: renaming the skip line from "test skipped: no device available" to "test skipped (77): no device available" deleted the substring that seven HRX ctest rows match with FAIL_REGULAR_EXPRESSION (tests/CMakeLists.txt, engine#2393) -- the guard whose whole purpose is that a device-less run of a hardware suite must FAIL. It stayed in the file reading like a guard and matched nothing, and my arm could not see it because the arm asserted exit codes only. Fixed by keeping the substring exact and putting the code after it: "%s for %s (77)\n", kSkipMessagePrefix, config.suite_name rather than by rewriting ggml-org#2393's regex: the row's decision ("their subject is the hardware, so a device-less run is a failure, not a skip") is the owner's, and this PR has no business overturning it in passing. `kSkipMessagePrefix` is now a named constant with the coupling in its comment, and the arm asserts the constant against the literal the rows use: ok the skip message keeps the substring seven HRX rows match in FAIL_REGULAR_EXPRESSION (engine#2393) Six arms now, all green (7 with the device case with a device). Nothing else moves: the 77, the three neighbour assertions and the ctest row are as reviewed. Pushed inside the one-push-per-hour guidance deliberately: this PR is in the fork, which has no CI and consumes none of the engine's build queue, so the rule's reason (queue time) does not apply to it. * tests: a whole run of device cases answers 77 too, not 0 (engine#2912, the other half) The single-case path was #439. This is the same sentence one level out: when EVERY selected case needs a device and the suite cannot see one, `run()` printed "test skipped: no device available …" and returned **0** -- a whole suite answering success having run nothing, which is the "green row for a suite that never touched a device" that engine#2393 fixed with a FAIL_REGULAR_EXPRESSION. 77 rather than 0, for the same reason as #439: the exit code should say it too, for a caller that reads only the code. Checked before touching it, because this path feeds seven ctest rows: **none of them sets SKIP_RETURN_CODE**, so ctest treats 77 as a failure -- the same verdict ggml-org#2393's regex already produces -- and no row can flip from red to green. The message keeps kSkipMessagePrefix byte-exact, so the regex still matches; the "(N device case(s) skipped)" detail moved after the prefix rather than into it. Two arms, both failing against the return-0 version: ok a whole run of device cases with no device returns 77, not 0 ok and no case body runs --------- Co-authored-by: bong-water-water-bong <[email protected]>
Claiming engine#2912.
hrx-ops-test --hrx-test-case <name>returned 0 when the case needed a device and the suite could not see one, so a caller reading the exit code could not tell a skip from a pass — and the caller this protects is exactly the one running a single case to test a hypothesis.Measured 2026-11-20 06:54:09Z, inside a held
gpu-holdticket:Three green rows, one second for all three, because another tenant was initialising into the GPU.
The change
77 is the engine's own convention (
SKIP_RETURN_CODE 77on its ctest rows), so a caller needs one rule rather than two — the issue's option 1.The arm pins the meaning of 77, not just its value
tests/test-testing-suite-skip.cpp— header-only, no device, no model, ~0 s:The three neighbours are what stop "return 77 unconditionally" from looking correct.
Not vacuous: compiled against the unpatched header it fails on the first line. (Getting that check to mean anything needed care — a quoted
#includeresolves next to the including file first, so my first attempt silently compiled the patched header and "passed"; the old header has to sit in a directory with a copy of the test.)Wired as a ctest row, no ggml link:
ctest -R test-testing-suite-skip→Passed 0.00 sechere.What I deliberately did not change
The whole-suite skip path (
testing_suite.h:581) still returns 0 when every selected case needs a device. Changing it turns the engine's green HRX rows into skips, which requiresctest_skips.txtin the engine repo to be updated in the same breath — a different repo, a different blast radius, and not what ggml-org#2912 asks for. Flagged here so it is a decision rather than an oversight.A pin note for the owner: this lands in the fork; the fix reaches the engine when
third_party/llama.cppmoves. A new row intests/CMakeLists.txtalso changes the fork's row population, whichtools/ci/fork_hrx_rows.pycan count (--expect N) — I checked and it is not wired to a fixed number in CI, so the pin bump is safe on that axis.