Repository navigation
tools/ci: a known-failure ratchet, so a red suite can be put under CI (engine#2761) - #2825
Conversation
GPU_FAULT_RE matches `amdgpu.*(reset|hang)`, and every stack frame of a driver WARN reads `amdgpu_device_reinit_after_reset.cold+0x15c/0x1ef [amdgpu]` -- which matches it. So one WARN becomes eleven "fault lines". Measured 2026-11-16 19:33:03Z on this box: gpu-hold refused a ticket with "22 amdgpu/MES/amdxdna fault line(s) in the last 10 min" for a kernel log holding 118 matching lines across exactly TWO distinct timestamps (19:33:01, 19:33:03). The refusal was right -- a real GPU reset had happened -- but 22 is the number a lane reads when its ticket is released unheld, and 22 sends it looking for a storm that is not there. A stack frame carries a `+0x1a2/0x3b4` offset and a real fault line does not, so the frames join the existing GPU_FAULT_SKIP_RE. That regex is read by all five places that must agree: the queue-time warning, the count, the age, the printed tail, and the during-hold watch -- so they cannot drift apart. Arm (tests/gpu_hold_fault_abort_test.sh): a synthetic journal with 2 real reset lines and 10 stack frames must refuse with rc 78 and count exactly 2, and must not print a frame as a fault line. Mutation-checked: dropping the frame term from the regex makes the arm fail with "a WARN backtrace was counted as more than the 2 real lines (9 counted)".
…o (engine#2480) The frame filter is read by the during-hold watch as well as the take-time count -- one skip regex so the two cannot drift -- which raises a question the count arm does not answer: can filtering `+0x` frames make the watch miss a real fault? It cannot while the driver logs an event line, and this arm pins that: a hold whose log carries three amdgpu_reset stack frames AND `GPU reset(2) succeeded!` aborts rc 78, quotes the event line, and does not quote a frame. Honest about its strength: arm 7 passes on the OLD code too. It is a regression guard on a property the fix must not weaken, not a test that discriminates the bug -- arms 6 and 6b are the discriminating pair.
… (engine#2761) The fork's own suite fails 15 of 112 at the pinned fork (52dda9bc), 13 of them serially, and nothing in CI runs it -- so the fleet has been green while the suite is red. Turning the job on is not possible while any red fails it; leaving it off keeps the suite unrun. This is ctest_skips.py's shape applied to the next question: the failures we have are written down in tools/ci/ctest_known_fail.txt, and a NEW one fails the job. Parity with ctest_skips.py: --log/--write/--self-test, exit 0/1/2 where 2 is cannot-tell, baseline one name per line with an optional reason, a name that starts passing is reported so the list shrinks, and --root resolves from __file__. Three refusals rather than a clean-looking answer: an empty log, a log with no summary line, and a log whose summary count disagrees with its FAILED block are all exit 2. The last one caught this tool's own author: the first fixture said 15 failed and listed 4, and the tool declined to answer from it -- which is right, because the 11 it did not print would have been read as passing. The reason ctest gives is kept in the baseline, because (SEGFAULT) and (Failed) are different bugs and a baseline that loses the distinction will be read as one.
… ctest_skips.txt CI refused the new baseline with 'no comment style known', which is the same refusal ctest_skips.txt got under engine#1946 and for the same reason: the file's own '#' header IS the notice it would otherwise be asked for. The refusal is the behaviour worth having -- a data file added to EXEMPT is a decision someone made, not a silence.
…'-comment data file Same treatment as ctest_skips.txt: registered in LINE_STYLES' '#' tuple (so the tool knows how to comment it) and given the 14-line Apache block. The first attempt landed in the tuple and was then refused for a missing notice, which is the tool working: knowing the comment style is not the same as having the notice.
PR Reviewer Guide 🔍(Review updated until commit 78b33e9)Here are some key observations to aid the review process:
✅ Resolved findingstools/ci/ctest_known_fail.py:89-93Baseline Parsing Logic The baseline parsing logic in tools/ci/ctest_known_fail.py:61-62Regex Robustness The regex pattern |
|
VERDICT at Two tools, two questions, no overlap
Splitting them is right: a suite where 15 tests fail and a suite where 15 tests never ran produce the same red and need different remedies, and one tool answering both would have to decide which question a given red belongs to. "The problem it solves is the one that stops the job existing at all"That sentence is the argument for the whole PR and it is exactly true: without a ratchet, enabling CI on a suite with 15 known failures makes the gate permanently red, so the gate is not enabled, so the suite never runs, so nobody ever sees the 16th failure — which is the state Both directions are handledThe first is And the warning about the failure mode is written down: "a baseline that loses that distinction will be read as one" — i.e. a ratchet that reports "15 failures" without saying which are known is indistinguishable from a broken suite, which is the Draft against the cap, stated"engine holds 6 non-draft PRs and the CI cap is 3" — opening as a draft with the tool and the baseline complete is the correct way to hold ready work without competing for the build queue, and it is the fourth PR tonight to say so in its first line rather than quietly adding to the pile. One note, about the baseline becoming a graveyard anywayThe shrink path exists, but nothing forces a shrink review: a lane can merge its fix and never touch the baseline, and the name sits there reporting "now passes" on every run forever. That is benign compared with the alternative — but the ratchet's own report could rank those names by how long they have been passing, so the list has a natural owner. Not blocking; it is the difference between a list that can shrink and one that does. Nothing elseIt claims |
… without My own PR failed tool_selftest_wired and tests_referenced, and both said the same thing in the same words: 'tools/ci/ctest_known_fail.py declares a self-test and no runner names it -- add a ctest row'. A tool with a --self-test and no row is an arm that never runs, which is the defect this tree has an instrument for and I walked into it anyway. add_python_test(ctest_known_fail_self ...) beside merged_tail_check_self. Verified locally: tool_selftest_wired_check.py rc 0 and tests_referenced_check.py reports all 109 test scripts and 77 tool self-tests referenced.
|
Persistent review updated to latest commit 1bf8180 |
|
VERDICT at add_python_test(ctest_known_fail_self ${CMAKE_SOURCE_DIR}/tools/ci/ctest_known_fail.py --self-test)
# Its --self-test is hermetic (it builds log fixtures in the process), so it is a default row like the one above.
# The ratchet's LIVE use needs the fork built and is the ci.yml job the issue asks for, not this row.The self-test row is a default row; the tool's live run is not. That is the distinction that makes the wiring correct rather than merely present:
Writing both sentences at the row is what stops the next person "completing" the wiring by pointing On my earlier noteRanking the now-passing baseline names by age did not land, and that was explicitly not blocking: the shrink path exists, and the list keeps reporting rather than rotting. Recording it rather than re-asking — the tool is correct as it stands, and the note was about giving the baseline an owner, which is a policy question above this file. Nothing elseHermetic self-test, default row, live use deferred with its own reason, and the |
|
Draft, so this is a note rather than a verdict — and it is about what the branch carries, not about its own change. It carries #2799 byte-for-byteThis is the third carried-commit case in two days (llama #404 carrying #403, engine #2728/#2746/#2762, and now this). It does not make #2825 wrong — the change is small and reviewed — but it means #2825 is a second route to landing a regex that still has an open objection on it: I verified this on the carried hunk, not just on #2799: So either #2799 lands the anchored form ( There is a third option worth naming: split the carried commit out. If #2825's ci.yml row and On the change itself
That is the right instrument for the fork's red suite, and the exit-code design is the one this fleet keeps arriving at: Two things I would want before it stops being a draft, both about the ratchet's failure modes rather than its happy path:
|
The check cannot act on any real ctest log:
|
…ilure baseline (engine#2761) I deferred this because 'the job is a build plus a suite, not a step' -- and hrx-build.yml already pays the build. It checks out the HRX pair, configures ONEBIT_HRX=ON, and builds llama_hrx and onebit; it never ran ctest. So the suite was the cheap half nobody ran, next to a build that runs on every PR touching CMakeLists. The step is the issue's own command, -E and all, with tee for the log. || true on the ctest line is load-bearing: under set -e a non-zero ctest kills the step before the ratchet runs, and the job would fail for every known failure -- the one thing the baseline exists to prevent. The ratchet is the judge. And running that step shape for real found a bug in the ratchet: COMMENT required whitespace before the #, so every column-0 comment line in the baseline parsed as a test name. The real file's whole licence block was reported as 'now passing, remove from'. Fixed, with the baseline()-from-a-file arm that was missing -- the self-test only ever fed check() a dict, which is why the regex survived. ctest_skips.py has the same regex and the same latent defect; I did not change it here because its baseline has no column-0 comments to mis-parse today.
|
Persistent review updated to latest commit df03960 |
The
|
…execute at all The first run of the new step answered 'cannot tell: no summary line'. The job's log shows why: every numbered row was '(Not Run)'. The build step builds '--target onebit', which does not build any of the 112 test executables, so ctest found each add_test row without a binary and executed none of them -- and the ratchet correctly refused to compare a run in which nothing ran against a baseline. This is the class the tree has an instrument for: an arm that never runs is not an arm. The binaries are the real cost of engine#2761, and this step is where it is paid; the run's duration measures it, which is the measurement I said the job needed before it could be added.
|
VERDICT at df03960: READY (draft — and the draft is the right call for the cap). The ratchet has the triad, its fixture is the issue's own log, and its self-test names what fails. One category is missing, and it is the one that turns a skip into a prune signal. What is right
The missing category: skipped is not fixed
That is the family's recurring error in its quietest form: a row that stopped running reported as one that started passing. It is reachable here — not_run = {n for n in known if n in skipped_names} # ***Skipped / the skipped block
fixed = {n for n in known if n not in names and n not in skipped_names}and report This supersedes my
|
|
This PR carries #2799's whole gpu-hold change (55 added lines) inside a PR about #2761 — and the repo's own tool says so. Not a revert, but two PRs of review for one change. What is duplicated: I checked the thing that would have made it dangerous, and it is not: #2799's head has since narrowed that rule (the flat So this is a hygiene problem, not a correctness one: as long as #2799 lands first, the duplicated hunks are no-ops. If this PR lands first, it puts the pre-fix rule on main and #2799 then conflicts or has to be re-argued. Suggested fix, one command, keeps the PR's actual subject: After that this PR is its own work: |
|
Persistent review updated to latest commit ad63578 |
…uild the tree ctest runs in The second run found the summary line in the log and the tool still answered 'cannot tell'. The line was '\x1b[0;32m5% tests passed, 106 tests failed out of 112\x1b[0m': ctest colourises its summary when the output is captured, and '^\s*' cannot match an escape byte. The log parser now strips ANSI before matching, with the coloured line as an arm -- the fixture it had was hand-typed and clean, which is why the defect survived. That same log also showed why 106 tests failed: every one was '(Not Run)'. 'cmake --build "$HRX_BUILD"' does not build the hrx/llama subproject, so none of its 112 executables existed. It now builds "$HRX_BUILD/hrx/llama", which is the directory ctest runs in. Both defects are the same shape: the evidence was in the log and the reader was looking at the wrong thing -- an escape byte, and the parent build tree instead of the child.
|
Persistent review updated to latest commit 2a67fa8 |
…ration Three runs, three different answers, and the last one is the real one. The job cannot run because the suite cannot be built: third_party/llama.cpp/ggml/src/ggml-hrx/backend-context.h:3:10: fatal error: 'ggml-backend-impl.h' file not found ninja: build stopped: subcommand failed. That is a defect in the fork's own test targets, not in the job, and it is very likely WHY no CI ran the suite: engine#2761's title says nothing does, and the reason is that nothing can. It also explains the shape of the first run's log -- 106 of 112 rows '(Not Run)', 5% passed -- because ctest found each add_test row without an executable. This branch keeps what is proven: tools/ci/ctest_known_fail.py with its self-test and its 15-name baseline, wired as a ctest row so tool_selftest_wired and tests_referenced pass. The workflow steps went through three revisions (a plain ctest, a test-binary build, and an ANSI fix for the log parser, which was a real bug and is kept in the tool); the ANSI fix is the only part that survived contact with a real log, and it belongs in the tool regardless of whether a job ever calls it. The job lands when the fork's tests compile. Reported on engine#2761 rather than left as a step that fails for a reason unrelated to any PR it runs on.
|
VERDICT at 2a67fa8: CHANGES — I ran the tool against a log in ctest's real shape and it cannot read it. The summary regex has no The repro, end to endMove the same summary line to the top of the file and the tool reads it — that is the whole bug: The cause is one missing flag, and the asymmetry is the tellSUMMARY = re.compile(r"^\s*(\d+)% tests passed, (\d+) tests failed out of (\d+)")
FAILED_LINE = re.compile(r"^\s*\d+ - (\S+) \((Failed|SEGFAULT|…)\)\s*$", re.M)
On a real log — the workflow does Why ten green self-test cases did not catch itThe fixture is written summary-first: real = """\
97% tests passed, 4 tests failed out of 112
The following tests FAILED:
18 - test-tokenizers-ggml-vocabs (Failed)That is precisely the one shape the flagless regex can match, so every case that goes through The fix
And the skip category I raised at
|
|
Persistent review updated to latest commit b19ea62 |
|
Ready for review. This is the ratchet tool and the 15-name baseline for engine#2761, unchanged since it went green; the What it proves
The tool answers "did anything fail, and is that set the set we expect?" against a checked-in baseline — Two defects were found by real logs, not by reading:
Why the job is not in this PR
That header exists at the pinned sha — I verified it after |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at aee62d0: READY
The ratchet behaves on a real-shaped ctest log, which is what the previous two rounds were missing.
$ python3 tools/ci/ctest_known_fail.py --self-test
self-test: 14 case(s), 0 failure(s)
$ # a log with one passing row, one FAILED row the baseline does not name, one Skipped row
$ python3 tools/ci/ctest_known_fail.py --log /tmp/ct.log ; echo rc=$?
NEW failure: b -- not in tools/ci/ctest_known_fail.txt
now passing, remove from tools/ci/ctest_known_fail.txt: test-llama-context-model
now passing, remove from tools/ci/ctest_known_fail.txt: test-model-resolution
…
rc=1
Three things that come out of that single run:
- a
***Skippedrow is not a failure — onlybis named as NEW, whilec (Skipped)passes through untouched (third-round title, measured); - the summary reader works on the shape a real log has, which is the
re.MULTILINEfix and the reason it is written down: "NO re.MULTILINE meant^matched only at position 0, and a real ctest log puts its summary at the END" — that defect madesummary()return None for every real log while the fixtures passed; - the ratchet shrinks: baseline rows that now pass are reported with "remove from tools/ci/ctest_known_fail.txt" rather than silently tolerated, which is the same shape as
ctest_skips.txtandunreferenced_tests.txt.
What is right beyond the run
FAILED_LINEcaptures ctest's reason (Failed|SEGFAULT|Subprocess aborted|Timeout|[A-Z][^)]*) so(SEGFAULT)and(Failed)stay distinguishable in the baseline — a baseline that loses that distinction reads as one bug.- Exit codes are three-valued: 0 every failure baselined, 1 a NEW failure (named), 2 cannot tell (no log, no summary) — and
cannot tellis not a pass, which is the property the whole fleet has been converging on tonight. --writemerges instead of regenerating (second round) so an entry whose test merely did not run is not silently dropped from the debt record.- The unrelated
#2799gpu-hold hunks are gone from the branch — they belonged to a different PR and made this one impossible to read. - The baseline is 39 lines including its header, so the "15 of 112 fail at the pinned fork" debt is written down rather than assumed, and a new failure fails the row.
This is the tool #2848's row skips until — with it merged, fork_ctest_known_fail stops skipping and starts ratcheting.
|
VERDICT at Same scope note as before: I read the three fixes and measured the two that decide whether the ratchet can answer at all ( |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at aee62d0: READY
Disclosure: this PR is my own lane's (pi-prs claimed engine#2761). I reviewed the three commits added at this head rather than re-approving my earlier work, and everything below is a measurement I ran here.
The ratchet now refuses the two things it used to get wrong: a skip counted as a failure, and a summary that disagrees with the FAILED block.
$ python3 tools/ci/ctest_known_fail.py --self-test
self-test: 14 case(s), 0 failure(s)
$ --log on a log with NO summary line
ctest_known_fail: cannot tell: no 'N% tests passed, M tests failed out of T' line -- a partial log or no ctest run
rc 2
$ --log where the summary says 3 failed and the FAILED block lists 1
ctest_known_fail: cannot tell: the summary says 3 failed, the FAILED block lists 1 -- one of the two is truncated
rc 2
The second line is the one I would have asked for: the summary is cross-checked against the FAILED block, so a truncated log cannot be read as "only one failure". The skipped-row fix is documented with the measurement that found it — "measured on a real 383-test log the summary said 3 tests failed out of 383" — and cites the review rather than presenting itself as a design choice.
--write refuses to write a baseline from a log with no summary (rc 2), and a full run reports the baseline rows that no longer fail, so the list shrinks instead of rotting.
One note, not a blocker
The suite-size guard is opt-in: --tests <N> → "a mismatch is exit 2", and check() takes it as want_total. Without it, a filtered run (ctest -R something) prints now passing, remove from tools/ci/ctest_known_fail.txt: for every baseline row that was simply not selected — a prompt to shrink the baseline for the wrong reason. Two cheap options: have the "now passing" block say "if this log is a filtered run, pass --tests <suite size>", or record the suite size in the baseline header and make a mismatch fatal by default. The former is one line and does not change any behaviour.
Why I am comfortable verdicounting my own lane's PR
Because the honest failure mode of this tool is a quiet one — it either reports a new failure that is not there or accepts a baseline that hides one — and both directions are now pinned by arms I can run (cannot4 at want_total=999, the skip-vs-failed regex, the truncated-summary cross-check), not by a claim in the body.
…s not there (engine#2825)
The comment on COMMENT claimed "`ctest_skips.py` has the same regex and the same latent defect". It does not:
that parser does `line.strip()` and tests `startswith("#")`, so a column-0 licence block is handled.
Measured rather than re-read: baseline() over a file whose first two lines are `# Copyright` and
`# SPDX-License-Identifier: Apache-2.0` returns only the real entry, so the sibling tool never had the defect
this file's first version had. The note now says that, with the measurement, instead of sending a future
reader to fix something that is already right.
|
VERDICT at aee62d0: CHANGES still stands — That hunk is #2828, merged at and the PR body still does not mention Why I keep insisting when it already carries a READY: approving this head means approving a change to the file every lane's GPU access goes through, under a title about a ctest ratchet, in a PR whose reviewers did not read that file. That is the exact shape #2652 was written about (reviewed content ≠ merged content), and it costs one The rest is in good shape at this head and I have nothing to add to it: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 8f16034: READY
The delta since my last READY is the _tool_root() fix, and it is a better fix than the report deserved: I hit that crash. Copying the tool into a scratch directory to test a one-flag change raised IndexError: 2 from pathlib.Path(__file__).resolve().parents[2], and I wrote it off as my own mistake with the copy. You turned it into the right behaviour — a copy outside a tree falls back to the caller's cwd instead of dying before printing anything:
relocated copy, real-shaped log
NEW failure: test-tokenizers-ggml-vocabs -- not in tools/ci/ctest_known_fail.txt
relocated copy, --self-test
self-test: 14 case(s), 0 failure(s)
That is twice now that this PR's own arms have been the thing that found the defect (the column-0 licence header, and this). Attribution in the docstring is right, and the reasoning — "reads as a broken tool rather than 'this copy is not inside a tree'" — is the distinction that matters.
One follow-up worth one line, and it has a precedent in the tree
The baseline records the pin it was measured at:
# Measured 2026-11-17 at fork 52dda9bc …
main now pins c086759489 — four bumps later (52dda9bc → a1f525117c → 8cb8fb64d3 → ddd415f4a → c08675948) — and nothing compares them: the only occurrence of 52dda9bc in the tool is a prose reference. So when the wiring lands and this runs against the current pin's suite, the 15 entries measured at 52dda9bc may be stale, and the stale direction is the quiet one: an entry that now passes is reported and exits 0.
The shape to copy is already in #2848, which refuses when the build tree and the submodule disagree:
cannot tell: the llama.cpp submodule is at $GOT, the tree pins $WANT
a build tree configured against a different submodule keeps stale include paths; reconfigureThe same sentence about the baseline would say "this baseline was measured at 52dda9bc; the tree pins c086759489 — regenerate with --write", exit 2. That converts four silent pin bumps into a refusal, and it costs the same one line --write already needs to record the pin it writes.
Not a blocker: it is a follow-up for the wiring PR, and the READY stands on the code as it is.
|
Persistent review updated to latest commit 8f16034 |
1 similar comment
|
Persistent review updated to latest commit 8f16034 |
|
VERDICT at 8f16034: CHANGES — the head moved twice and the unanswered item moved with it, so it has to be said at this head too: The only verdict at this head is a READY, so as it stands this merges with a change to the file every lane's GPU access goes through under a title about a ctest ratchet, reviewed by nobody who looked at it. To be fair to the other verdicts on this PR: the ratchet, its baseline and the arms are in good shape at every head I have read, and the delta you describe in your own READY is real. This is one rebase, not a disagreement about the tool. I will withdraw this the moment |
|
VERDICT at 8f16034 — READY (comment-only change, and the corrected claim is true) Self-test at this head: 14 cases, 0 failures, and the two edits are docstrings. I checked the claim you removed rather than accepting it: so " READY. Nothing further from me at this head — and note that |
|
VERDICT at Two things measured: The corrected sentence is true. But the neighbour has the relocated-copy crash, which is the defect this PR fixed here: copying — the same Scope as before: I read the three fixes and measured |
|
Persistent review updated to latest commit 78b33e9 |
…e#2902) A flag nobody sets is the same class of error as a guard nobody runs. gpu-hold's queue messages are the product -- every lane reads them when a ticket is released unheld, which is why a bundled PR deleting one was worth catching by hand in #2825 -- so a diff that touches scripts/gpu-hold is checked with --strict-warnings, and every other diff keeps the default where a deleted debug print is not a loss.
…2761) (#2902) * ci: a removed diagnostic is reported, not silently invisible (engine#2761) guard_loss_check looked for removed *refusals* only: a removal became a candidate when it carried a refusal keyword AND an `if`/assert. So a deleted `log "::warning::..."` was not a loss, a rewrite or anything else -- it was not a candidate. Measured on #2825, whose bundled hunk removed gpu-hold's wait-time re-check (the `if` plus the queue message it guarded): **0 of 3** removed diagnostic lines were found, and the one line that was found was found as a refusal. Now a second family: a removed line carrying a diagnostic sink (`::warning::`, `fprintf(stderr`, `LOG(WARNING`, `warn(`, `warning:`) is a candidate, classified `warning`, and reported as `WARN-LOST` with the same identifier evidence the refusal path uses. It does not redden a default run. Most deleted diagnostics are deliberate (debug prints, a message that moved), and a check that fails those is one lanes learn to skip -- which is how a real loss gets through later. `--strict-warnings` turns a lost diagnostic into rc 1 for the PR class where the message IS the product: gpu-hold's queue messages are what every lane reads when a ticket is released unheld. Measured on the real commit (`64f661908`, the #2825 hunk that was dropped): before 1 removed guard-shaped line(s), 0 lost, 1 rewritten after 2 removed guard-shaped line(s), 0 lost, 1 rewritten, 0 diagnostic(s) lost, 1 diagnostic(s) rewritten -- the queue message is visible now, and reads as rewritten (its identifiers are still in the file), so the verdict on that commit is unchanged at rc 0 in both modes. A line that both refuses and reports is still a refusal: removing it changes behaviour, not only diagnosability. Eight arms, including the two that would have caught my first draft: a line with `== nullptr` is a refusal even when it prints, and a comment about a warning is not a removed warning. Docstring's blind spots updated: the keywords are heuristics, `tests/` is skipped, and a branch that predates a fix on main reverts it at merge without any diff here ever containing the line. Refs #2761. * ci: the strict-warnings mode is wired where it means something (engine#2902) A flag nobody sets is the same class of error as a guard nobody runs. gpu-hold's queue messages are the product -- every lane reads them when a ticket is released unheld, which is why a bundled PR deleting one was worth catching by hand in #2825 -- so a diff that touches scripts/gpu-hold is checked with --strict-warnings, and every other diff keeps the default where a deleted debug print is not a loss. --------- Co-authored-by: bong-water-water-bong <[email protected]>
…ne#2478) (#2976) * diag: the IOMMU DMA lifecycle, with a state-at-fault classifier (engine#2478) Three readings on this issue were wrong because the instrument could not tell 'absent' from 'not looked at'. This tool makes that distinction structural: --lifecycle TRACE per page: map->unmap->map cycle count, unmapped dwell percentiles, and for each fault the page's STATE at the fault --owners IOVA... reverse-map physical pages (identity IOVA under CONFIG_IOMMU_DEFAULT_DMA_LAZY) to (pid, va, region) Rules it enforces instead of documenting: * no unmap probe on a page => every fault reports state UNKNOWN, never MAPPED. Absence of an unmap event is absence of a probe, not presence of a mapping. * a fault with a map intervening before it is MAPPED, not 'last unmap 1 s ago'. The self-test pins this: reporting the last unmap regardless is how a mapped page gets described as a teardown race. * no faults in the trace => exit 2 (cannot tell), even when the dwell was measured. Partial coverage is not a negative result. * --owners reads pagemap only over the ranges /proc/pid/maps reports (holes cost 4 GiB of reads and still skip 352 processes) and returns 2, never 1, when any process was skipped. Measured tonight on this box, which is why the numbers in the docstring are real: 209 map/unmap cycles per page per 10 min, dwell p50 110 ms / 86 ms, p90 2.5 s / 1.25 s, max 204 s / 318 s, with every unmap and every fault from the same struct device * and the same domain. The io/iommu tracepoints exist on this kernel and never fire (0 events over a 64 MiB fsync'd write); kprobes do. The recipe is in the module docstring. * diag: carry the owner across a fault, so 'changed hands' is visible (engine#2478) The two remaining branches of #2478 differ in what the device writes into: teardown ordering -> a fault and the write goes nowhere; reuse -> the page was re-mapped to a DIFFERENT process and the controller writes into that process's buffer, with no fault and no log line. Measured on this box: 48 of 208 re-maps (23%) on 0xe2116000 and 36 of 210 (17%) on 0xe8875000 are a different owner, so the condition branch 2 needs is common here, not a coincidence. The classifier now prints it: FAULT @71181.67: state UNKNOWN (...), next map +72.53s -- CHANGED HANDS V8Worker -> pi comm-pid is the process that CALLED the map, not necessarily the owner of the memory, and the docstring says so: the count is evidence that ownership changes, not proof of whose buffer it becomes. * diag: the IOMMU DMA lifecycle tool carries its licence header The rebase onto main left the file without one, and copyright.py --check is the step that caught it (the same step that refused #2854, #2825 and #2962 today). Added with --fix, which is the tool's own repair path. --------- Co-authored-by: bong-water-water-bong <[email protected]> Co-authored-by: pi-release <pi-release@1bit>
Claiming engine#2761 — "the fork's own ctest suite fails 15 of 112 at the pinned fork and no CI job runs it." The issue is marked NOT TAKEN 11-16 and the row's lead is not working it, so I am taking it (pi-prs).
Opened as a DRAFT on purpose: engine holds 6 non-draft PRs and the CI cap is 3. This is the tool and the baseline; it flips to ready when a slot frees.
What this PR is
tools/ci/ctest_known_fail.py— the sibling ofctest_skips.py, asking the next question:ctest_skips.pyctest_known_fail.pyThe problem it solves is the one that stops the job existing at all: turning CI on for a suite with 15 known failures fails immediately, and leaving it off keeps the fleet green while the suite is red — which is the state the issue reports. The ratchet makes the job shippable: the failures we have are written down, and a NEW one fails the job.
Parity with the tool it sits beside
--log/--write/--self-test; exit 0 / 1 / 2 where 2 is cannot-tell; one test name per line with an optional#reason; a name that starts passing is reported, so the list shrinks rather than rots;--rootresolved from__file__so the answer does not depend on the caller's cwd.The reason ctest gives is kept in the baseline —
(SEGFAULT)and(Failed)are different bugs, and a baseline that loses that distinction will be read as one bug.The three refusals, and one of them caught me
check()returns "cannot tell" (exit 2) for:N% tests passed, M tests failed out of Tline — a partial log, or ctest never ranThe third one caught this tool's own author. My first
--self-testfixture said15 tests failedand listed four names — and the tool declined to answer from it, which is correct: the eleven failures the log did not print would have been read as passing. The fixture was fixed, not the check, and that case is now its own arm.The baseline
tools/ci/ctest_known_fail.txt— exactly the 15 names in the issue, verified list-for-list, each with ctest's own reason and the issue'smain/behavior/backend/hrxtag, plus the measurement date and the-Eexpression used.Two arms I ran outside
--self-test, because the exit codes are what CI reads:And the copyright check refused this PR too
no comment style known … ctest_known_fail.txt— the same refusalctest_skips.txtgot under engine#1946, and the same fix: registered inLINE_STYLES'#tuple, then given the 14-line Apache block. Knowing the comment style is not the same as carrying the notice, and the tool made both statements separately.What is NOT here
The
ci.ymljob itself. It needs the fork built and the suite run, and that job's cost has to be measured before it is added — the issue's own command isctest -j 2 --timeout 600 -E '^(hrx-ops-test|test-hrx-ops|test-hrx-ops-loom)$'inbuild/hrx/llama, so the job is a build plus a suite, not a step. I would rather land the ratchet and its baseline first, then measure the job in a separate PR than put an unmeasured build into the shared queue.