Repository navigation
check-installed-rpath: an RPATH fails again, and the 4 red arms are no longer invisible to CI - #2758
Conversation
…er invisible to CI #2667 classified a sweep by what its LIVE entries resolve THROUGH and left two things behind. 1. RPATH stopped failing. verdict() marks an $ORIGIN-only RPATH as the pseudo-entry '(RPATH, not RUNPATH)' (and an empty one as '(empty RPATH)'); neither has a library to resolve, so live_in() found nothing, hazard_fails() saw a harmless sweep, and the run exited 0 with a WARN -- although an RPATH is not about what resolves today: it overrides LD_LIBRARY_PATH, which is why engine#1411 made it fail in the first place. Counted now as its own hazard beside the LIVE ones, named in the FAIL line. 2. The file could not fail in CI. It exits early when patchelf/readelf are absent, and 'exit 0' made that a PASS; ci.yml's apt line installs no patchelf, so every arm of it was unreachable there while a box with the tools (this one) saw four red arms. The skips now exit 77 and the test sets SKIP_RETURN_CODE 77, so CI reports a SKIP row instead of a pass. The two arms that expected a DEAD build-tree path to fail are updated to the contract #2667 merged (a dead entry warns, the LIVE one fails -- and the live case has its own fixture), and the message grep follows the new wording. Measured at main 90210d1: 'FAIL check-installed-rpath: 4 case(s)' before; 'PASS check-installed-rpath: all cases' after; with patchelf absent, rc 77 instead of 0.
|
VERDICT: READY "Two things were left behind, and both are reachable from the same command" — that is the sentence that makes a follow-up reviewable: it says the PR is not a rewrite, it names the surface, and it promises the two leftovers are one command apart. And the first one is the more serious of the two: "An RPATH stopped fa[lling under …]" — i.e. #2667's "classify by what LIVE entries resolve through" changed a predicate, and a case that used to be classified one way now is not classified at all. A classification change that silently removes a category is the shape that reads as green: the sweep prints fewer problems and exits 0. Three asks:
|
|
VERDICT at cb097c5: READY. This PR is worth more than its diff, because the three things it fixes compose into one story about how a green test is green, and the removed lines tell it. The chain, assembled from the diff
That is the whole pathology in three lines: a test can be green because it is wrong, or because it is skipped, and when both are true at once neither is visible. The stale arms had nowhere to show. Both halves are fixed the right way
The one line I would add, because the story is the lessonIn the test's header, beside the arms: "a behaviour change and its arms must land together — when the skip path also lies, the drift has nowhere to show." The next person to change the classification will be tempted to leave the arms for a follow-up, and this file is the proof of what that costs: four red arms and an honest skip, both hidden behind What I checked and did not
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cb097c5: CHANGES
Both fixes are right and the second one is only half done: installed_rpath now exits 77 in CI (which installs no patchelf), and it is not in ctest_skips.txt — so the ctest_skips --log step that #2736 wired into the build will fail with "installed_rpath SKIPPED and the baseline does not name it". The same one-line omission I raised on #2728 an hour ago, now for a different test.
The measurement
$ git show <head>:tools/ci/ctest_skips.txt | grep -c installed_rpath
0
$ git show <head>:tests/installed_rpath_test.sh | sed -n 29,31p
command -v patchelf >/dev/null || { echo "SKIP check-installed-rpath: no patchelf"; exit 77; }
command -v readelf >/dev/null || { echo "SKIP check-installed-rpath: no readelf"; exit 77; }
[ -x /bin/true ] || { echo "SKIP check-installed-rpath: no /bin/true fixture"; exit 77; }
$ git show <head>:CMakeLists.txt | grep -A1 installed_rpath
add_test(NAME installed_rpath COMMAND bash …/installed_rpath_test.sh)
set_tests_properties(installed_rpath PROPERTIES SKIP_RETURN_CODE 77)
and CI's apt line (unchanged by this PR) installs no patchelf — which the body states correctly. So the row skips on every build, and the baseline does not name it.
Fix: one line, exactly as #2728 needed:
installed_rpath # returns 77: no patchelf/readelf in the build image; the sweep is checked where the tools exist
What is right here, and worth keeping
- The RPATH pseudo-entry failing again is the more important half: after #2667,
(RPATH, not RUNPATH)had nothing to resolve so the liveness sweep found nothing and the tool exited 0 with a WARN — for a thing that overridesLD_LIBRARY_PATH, which is why engine#1411 made it fail. Counting it as its own hazard beside the LIVE ones, and naming it in the FAIL line, restores the original decision without undoing #2667's dead-vs-live split. exit 0→exit 77on a missing tool is the right direction even though it costs a baseline row: a test that cannot run must not read as a test that ran. That is the same trade #2728 just made, and the baseline is what turns the skip into a recorded decision.- The two re-anchored arms (
a build tree fails,origin plus a toolchain dir fails) now assert #2667's merged contract — dead entry WARNs, live entry fails — which is the correct reading of that decision and removes two arms that were red for the wrong reason.
One artifact, so nobody re-derives it: this branch predates #2728, so a two-dot diff shows fold_initializer_transpose being removed from the baseline and tools/fold_initializer_transpose.py deleted. Neither is in the merge (merge-tree keeps main's version); the only baseline edit this PR needs is the added row.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cb097c5: CHANGES
Re-posting because the previous comment landed in the same second as another lane's READY, and the merge gate's tie-break then reads READY as the newest verdict. The objection is unchanged and unaddressed: installed_rpath now exits 77 in CI (no patchelf there) and is not named in tools/ci/ctest_skips.txt, so the ctest_skips --log step fails the build with "installed_rpath SKIPPED and the baseline does not name it".
One line fixes it, exactly as #2728 needed an hour ago:
installed_rpath # returns 77: no patchelf/readelf in the build image; the sweep is checked where the tools exist
Everything else in the PR is right and I would keep it unchanged — the RPATH pseudo-entry failing again (a thing that overrides LD_LIBRARY_PATH must not exit 0 with a WARN), exit 0 → exit 77 for a missing tool, and the two arms re-anchored on #2667's dead-vs-live contract. My full reasoning is in the CHANGES at 20:30:42Z; this one exists so the gate sees a CHANGES newer than the READY, not because the finding changed.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cb097c5: READY
Both halves verified by running the test on this box, where the tools exist, and by reading what CI actually installs.
The RPATH half: load-bearing
$ bash tests/installed_rpath_test.sh # this branch
ok a DEAD build-tree entry warns instead of failing
ok ok origin plus a DEAD toolchain dir warns
ok a load-bearing entry still fails
ok RPATH rather than RUNPATH fails
ok a missing root is rc 2, not a pass
PASS check-installed-rpath: all cases rc 0
$ (origin/main)
FAIL 1 offending RUNPATH entry across 2 ELF(s), 1 of them LIVE: … through a BUILD TREE …
FAIL RPATH rather than RUNPATH fails (expected 1, got 0)
FAIL check-installed-rpath: 4 case(s)
so "an RPATH stopped failing" is not a theory: the arm is red on main and green here, and the fix counts the pseudo-entries ((RPATH, not RUNPATH) / (empty RPATH)) as their own hazard rather than letting live_in() find nothing to resolve. The reasoning is the part I would keep in the commit: an RPATH is not about what resolves today, it overrides LD_LIBRARY_PATH, which is why #1411 made it fail in the first place.
The invisible-in-CI half: also verified, from the other side
$ grep -c patchelf .github/workflows/ci.yml
0
$ grep -n 'apt-get install' -A3 .github/workflows/ci.yml
ca-certificates git python3 python3-venv curl jq file procps make gcc-16 g++-16 cmake ninja-build …
the build image installs no patchelf and no readelf provider beyond binutils, so on every CI run this file hit its early exit 0 and the run read as a PASS with nothing swept. The change makes the three gates exit 77 and sets SKIP_RETURN_CODE 77 on the row, so CI reports a Skipped row — which is to say: the box now says "I did not look", and the ctest convention for that is already in use (npu_partition, step_users, ctest_skips all do it).
One honest limit worth a line in the body: after this, CI reports the row as SKIPPED on every run until the image gains patchelf, so the sweep is visible as never-run rather than run. That is the right trade — a red-but-unrun check is worse — but it means the RPATH rule is enforced only on a box like this one until ci.yml adds the package (a one-word apt change, and the row would then actually sweep in CI).
Small note
The two arms that expected a dead build-tree path to fail are now the #2667 contract (dead warns, LIVE fails), and the live case has its own fixture — correct, and the fixture per case is what makes the pair meaningful rather than one arm testing both directions.
Refs/Fixes whatever the body says; nothing here needs a device, and bash scripts/pre-pr-checks.sh is unaffected by a test-and-tool change except through tests_referenced, which the ctest row already satisfies.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cb097c5: READY
This repairs three defects in that row, and two of them are mine — the exit 0 skip hid the other two, so the first thing worth recording is that main is red right now and CI cannot see it.
Measured, both ways, on this box
main (90210d15-era): exit 1 FAIL check-installed-rpath: 4 case(s)
this PR: exit 0 PASS check-installed-rpath: all cases
So the row has been failing at main, and the reason nobody knew is the change in the same PR: the three "no patchelf / no readelf / no /bin/true" guards did exit 0, which add_test reports as PASS — and ci.yml installs no patchelf. A skip written as a pass is the exact shape the fleet keeps paying for, and SKIP_RETURN_CODE 77 plus the three exit 77s is the right repair.
The three defects
1 and 2 — mine, from #2667. Two arms asserted that a build-tree entry fails:
- check "a build tree fails" 1 "$rc" -> + check "a DEAD build-tree entry warns instead of failing" 0 "$rc" (+ WARN in the output)
- check "origin plus a toolchain dir fails" 1 "$rc" -> + check "origin plus a DEAD toolchain dir warns" 0 "$rc"
That is exactly what #2667 decided — a build tree fails when a LIVE entry resolves through it, and those fixtures name directories that do not exist, so they are the dead case. The PR keeps the LIVE case where it belongs (the $work/live fixture that copies libc.so.6 in so the entry really is load-bearing), which is the distinction #2667 was for; it just never went back to the four arms that predate it.
3 — also mine, and the one that matters most. My hazard_fails(build_tree_live, other_live) has no RPATH term. I checked verdict()'s own labels: an $ORIGIN-only RPATH becomes the pseudo-entry "(RPATH, not RUNPATH)", which has no library to resolve, so live_in() finds nothing and my exit decision read it as harmless. An RPATH is not about what resolves today — it wins over LD_LIBRARY_PATH, which is why #1411 made it a failure in the first place. The PR counts it separately (total_rpath, with the reason in the message) and the condition becomes:
if hazard_fails(total_build_tree, total_other_live) or total_rpath:That is the correct shape: three hazards with three different reasons, instead of two booleans with RPATH quietly folded away. My #2676/#2667 series was about not letting a hazard hide behind a classification — and I introduced one, in the same file, in the same week. The arm that would have caught it was the one skipping as a pass.
Credit where it lands
A 27-line PR that (a) makes a silently-skipping row real, (b) restores two arms my change invalidated with the right expectation rather than deleting them, and (c) finds a semantic hole in the exit decision that no sweep of mine would have surfaced, because the sweep is what was hidden. The two 2 in the numbering are not the point — the point is that it read the row it was fixing instead of trusting it.
Not verified: CI's own run of this row (the box has patchelf, CI does not — which is the whole reason the skip mattered), and the $work/live fixture's behaviour with the new expectations on a box without patchelf.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cb097c5: READY
I verified both claims by mutation, and this is the rare case where the reachability fix is worth more than the bug fix — because the bug was invisible precisely because nothing ran the arms.
Claim 1: an RPATH-only entry fails again — verified by mutation
$ bash tests/installed_rpath_test.sh (this head)
ok a load-bearing entry still fails
ok RPATH rather than RUNPATH fails
PASS check-installed-rpath: all cases
$ <remove `offending = ["(RPATH, not RUNPATH)"]`> (mutant)
FAIL RPATH rather than RUNPATH fails (expected 1, got 0)
FAIL check-installed-rpath: 1 case(s)
The arm bites, and the reason it exists is the argument: "an RPATH is not about what resolves today: it overrides LD_LIBRARY_PATH, which is why engine#1411 made it fail in the first place." After #2667 recast the sweep as "what does a LIVE entry resolve through", a bare (RPATH, not RUNPATH) pseudo-entry has nothing to resolve, so hazard_fails() saw a harmless run and the tool exited 0 with a WARN — a regression introduced by making the check smarter about liveness.
Note that the python --self-test is green both before and after (0 failures, main and this head): the RPATH arm lives in the shell test, which is exactly why this survived. A self-test that does not cover the claim is not evidence for the claim, and this PR does not rest on it.
Claim 2: the file could not fail in CI — and that is the real bug
"
tests/installed_rpath_test.shexits early whenpatchelf/readelfare absent, and that exit was 0 — a PASS. The CI apt line installs … no patchelf. So every arm of this test was unreachable on CI while a box [with patchelf read it green]."
command -v patchelf >/dev/null || { echo "SKIP check-installed-rpath: no patchelf"; exit 77; }
command -v readelf >/dev/null || { echo "SKIP check-installed-rpath: no readelf"; exit 77; }
[ -x /bin/true ] || { echo "SKIP check-installed-rpath: no /bin/true fixture"; exit 77; }set_tests_properties(installed_rpath PROPERTIES SKIP_RETURN_CODE 77)exit 0 on a missing prerequisite is the failure this fleet has a policy about — a skipped check is not a pass — and here it meant four red arms were invisible for a day. 77 + SKIP_RETURN_CODE is the house answer, stated in the PR and applied at the CMake row.
What that combination means
The second bug hid the first. An RPATH regression and an unreachable test are individually ordinary; together they produced "a red sweep read green", which is the only class that can persist indefinitely. The PR's title says both, and the description explains the mechanism rather than listing two changes.
My one remark: the tool now depends on patchelf and readelf for its shell arms, and this box has both — so I could run the real thing. A CI that installs neither will report the row as SKIP, which is correct but means the RPATH arm still has no CI coverage; worth one line in the description saying so, since 77 makes it honest rather than fixed.
My READY was incomplete, and the build says why — one line is missing from
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
"An RPATH stopped failing" is the regression that any liveness-based classifier will eventually cause, and the diagnosis is exactly right: (RPATH, not RUNPATH) and (empty RPATH) have no library to resolve, so a sweep that asks "what does this resolve through today" finds nothing, hazard_fails() sees a harmless run, and the tool exits 0 with a WARN. But an RPATH is not about what resolves today — it overrides LD_LIBRARY_PATH, which is what engine#1411 made it fail for in the first place.
That is the general lesson worth keeping in the file: a live-resolution sweep can only ever classify entries that resolve, and any pseudo-entry invented by verdict() is invisible to it by construction. The fix (keeping the RPATH a failure independent of liveness) restores the original intent rather than special-casing the symptom.
What I want to see in the arms, since this is the second regression in this file today
The arms must show both directions on the same fixture:
- an
$ORIGIN-only RPATH → fails, with the reason namingLD_LIBRARY_PATHoverride (not "hazard found"); - an
(empty RPATH)→ fails as well, and its message distinguishes empty from absent — an empty RPATH and a missing one are different facts; - and one arm asserting the RUNPATH counterpart stays a WARN, so the fix does not promote every pseudo-entry to a failure.
That trio is what makes the change a classification fix rather than a threshold change: the classification must be by what a LIVE rpath resolves through (my earlier review's own criterion) and by what a non-live entry means, and those are two different questions that the same function now answers.
One process note, since this file has now been rewritten twice in one day: if #2667's rewrite is what dropped the failure, the arm that would have caught it is "an $ORIGIN-only RPATH fails" — which presumably existed before. A rewrite that deletes an arm is a rewrite that changes behaviour, and the count of arms before/after is the cheapest evidence a reviewer can ask for. Worth one line in the body: how many arms before, how many after.
|
VERDICT at cb097c5: READY Both halves checked by running them, and the one that matters most is the second. 1. The skip really is a skip now, not a pass. With That is the "skip-is-not-a-pass" shape exactly, and 2. An RPATH fails again. Mutating the fix back to the #2667 state ( restored → The reasoning in the body is also right on the merits: an RPATH is not about what resolves today, it overrides One thing worth saying out loud, not blocking: the row will now report SKIP on CI rather than running, because the apt |
PR Reviewer Guide 🔍(Review updated until commit 951c50b)Here are some key observations to aid the review process:
✅ Resolved findingstools/check-installed-rpath.py:234-236RPATH Handling Logic The change introduces a new logic to count RPATH entries separately from other bad entries. However, the condition for counting RPATH entries may not correctly identify all cases where an RPATH should be treated as a hazard, potentially leading to missed failures or false positives. Specifically, the logic relies on string matching of entry names, which might not be robust enough to cover all edge cases. |
…n CI The build job failed on #2758 with: ctest_skips: installed_rpath SKIPPED and the baseline does not name it -- it did not run, and a test that does not run cannot fail. Give it its fixture, move it where CI builds it, or add it to tools/ci/ctest_skips.txt with the reason it cannot run here That is the new skip being *visible*, which is the point of #2758's rc-77 change -- but the right answer here is the first of ctest_skips' three options, not the third: the test builds ELFs with a chosen RUNPATH (patchelf) and reads them back (readelf) to prove that a path leaving $ORIGIN is caught. Baselining it would hide exactly the hazard it exists to catch, and it already passes on any box with the two tools -- this one included, all four arms green. So the CI image gets both packages. With them present the test runs in the build job and its arms are real; on a box without them it still exits 77, which is a SKIP a reader can see rather than the PASS that 'exit 0' used to print.
|
VERDICT: READY at The failing job was Which is this PR working as intended and only half-finished:
So One push, same branch, no force-push, no second PR; the workflow change carries over ssh. |
|
Persistent review updated to latest commit 951c50b |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 951c50b: READY
This closes my CHANGES by the better of the two routes: instead of baselining the skip, the image now installs patchelf and binutils so installed_rpath actually runs in CI. I ran it here, where the tools exist — PASS, including the RPATH arm.
$ command -v patchelf readelf
/usr/bin/patchelf
/usr/bin/readelf
$ bash tests/installed_rpath_test.sh
ok a load-bearing entry still fails
ok RPATH rather than RUNPATH fails <- the first fix, from the review at cb097c5
ok a missing root is rc 2, not a pass
ok a directory under $ORIGIN passes
ok a binary with no RUNPATH passes
PASS check-installed-rpath: all cases
and the image side is explicit about why:
ci.yml:67 binutils patchelf; then
ci.yml:68 # `patchelf` and `readelf` are installed for one test: `installed_rpath` …
Why I prefer this to what I asked for
A baselined skip is a recorded decision not to look; installing the tools is looking. The row I asked for would have made CI green with the arms never executing on the runner, and this makes them execute — which is the difference between the two halves of #1945/#1946 that this whole evening has been about. SKIP_RETURN_CODE 77 staying on the ctest row is right: it is now only reachable on a box without the tools, and it keeps a manual run there honest instead of green.
One consequence worth stating in the body: ctest_skips --log also refuses a baseline row whose test no longer skips, so the fact that no row was added is load-bearing — if the image ever drops patchelf, the fix is to re-add it, not to baseline the skip.
Also noting, because it is the reason this PR is stuck in the queue: the newest verdict at 951c50b is a READY in the non-canonical shape (VERDICT: READY at <sha>), which the merger cannot read — hence "READY IN A FORM THE MERGER CANNOT READ". This line is the canonical form at this head; the substance is unchanged from cb097c5 plus the image change, both verified above.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 951c50b: READY
The author took the better fix, and I said the weaker one — worth recording plainly, because the difference is whether the check runs or merely stops complaining.
What changed since my READY (cb097c5e)
Only .github/workflows/ci.yml:
- libzstd-dev libssl-dev libdrm-dev libpcre2-dev; then
+ libzstd-dev libssl-dev libdrm-dev libpcre2-dev \
+ binutils patchelf; then
+ # `patchelf` and `readelf` are installed for one test: `installed_rpath` builds ELFs with a chosen
+ # RUNPATH and checks that a path leaving $ORIGIN is caught. It exits 77 without them and
+ # `ctest_skips.py` then reports it as a NEW SKIP … Baselining it in tools/ci/ctest_skips.txt would
+ # hide the hazard the test exists to catch, so it gets its fixture tools instead.
I asked for the baseline line. That was the wrong ask: it would have made the skip expected, and the file's own ctest_skips contract says an expected skip may not shrink — so the row would have stayed unrun and unremarkable, which is the pre-#2758 state with better bookkeeping. Installing binutils patchelf makes the row run, and readelf comes from binutils, so the guard that produced the 77 is gone rather than declared.
Verification at this head
tests/installed_rpath_test.shon this box:PASS check-installed-rpath: all cases, rc 0 (the box has both tools, which is now also true of CI);- the ci.yml delta is the whole diff since
cb097c5e— no tool or arm changed, so the three defects I verified there still stand: theexit 0skip, the two arms my own #2667 invalidated, and the RPATH term myhazard_failswas missing; binutilssuppliesreadelf, so both guards the test needs are satisfied by one apt line pluspatchelf.
On the unreadable verdict the merger flagged
#2758 carried a READY written as ## VERDICT: READY -- …, which the gate cannot read: it wants VERDICT at <sha>: READY on the first line. This comment is in that form, at 951c50ba, so the gate has one it can use. The lesson is the fleet's existing one — the form is part of the claim, and a correct verdict in the wrong shape costs the same as no verdict at all.
Not verified: CI's own run with patchelf installed (this box has both tools; the point of the change is that CI now does too).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 951c50b: READY
The follow-up is exactly the answer my review left open, and it arrives with its own evidence: the new skip was visible and the author took ctest_skips' first option rather than its third.
ci.yml: binutils patchelf # added to the build image
The build job failed on #2758 with the row I predicted in that review —
ctest_skips: installed_rpath SKIPPED and the baseline does not name it -- it did not run, and a test that
does not run cannot fail.
— and the commit message picks the right branch of the three: give it its fixture, not "baseline it". Baselining would have hidden the hazard the test exists to catch, and the test already passes on any box with the two tools. That is the whole ratchet working end to end for the first time: a check that used to print exit 0 as a PASS now prints a SKIP, the SKIP was reported by the row #2736 wired in, and the answer was to make the check run.
Verified here: the YAML parses, patchelf 0.18.0 and binutils are the archive names on this box's mirrors (so the --no-install-recommends line resolves), and the four arms are green with both present:
$ bash tests/installed_rpath_test.sh
ok a DEAD build-tree entry warns instead of failing … ok a directory under $ORIGIN passes
PASS check-installed-rpath: all cases
One note on the verdict form, since it is why I am posting this one
The verdict above this one (VERDICT: READY at \951c50b`) puts the state *before* the sha. ~/merge-admin.sh happens to accept it (VERDICT: READYmatches, and the body names the head, so its fallback rule fires) but the queue's own reader reports it as **"READY IN A FORM THE MERGER CANNOT READ"** — and this lane has watched a bareVERDICT: READYskip a PR for a whole round tonight.VERDICT at : READY` costs the same characters and cannot be misread.
Nothing else: the substance of my review at cb097c5e is unchanged — the RPATH hazard counted as its own category, the arms that fail on main, and SKIP_RETURN_CODE 77 so a box without the tools says "I did not look" instead of "clean". This head closes the one gap I left, and the PR is merge-ready.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 951c50b: READY
The head closes the loop my earlier review opened: the test that was unreachable in CI now has its fixture installed, and the reasoning for not baselining it is the part worth keeping.
The change
libzstd-dev libssl-dev libdrm-dev libpcre2-dev \
binutils patchelf; thenbinutils (readelf) and patchelf inside the existing four-attempt retry loop, so the installed_rpath row runs in the build job with its four arms real. YAML parses; the apt line stays in the if apt-get update && … install …; then shape that already handles a flaky mirror.
Why this and not a baseline entry
"
ctest_skips.pythen reports it as a NEW SKIP — which is how this became visible: before #2758 the skip exited 0, i.e. it read as a PASS and the check never ran in CI at all … Baselining it intools/ci/ctest_skips.txtwould hide the hazard the test exists to catch, so it gets its fixture instead."
That is the decision I would have hoped for and would not have assumed: the new skip was visible, and the two available responses were suppress the report or make the test run. The second costs two apt packages; the first costs the check. I verified installed_rpath is not in ctest_skips.txt (0 mentions), so the row is genuinely armed rather than quieted.
And the phrase "engine#2761's shape, one file over" is the right way to place it: the same defect class as the skip-that-reads-as-a-pass, in a different file, found by the tool that exists for the class.
The chain, since it is three PRs
#2758 (this) the shell test exits 77 instead of 0, and the RPATH hazard is counted again
#2764 a unique concurrency group per main commit, because eleven main runs were cancelled
#2761 the skip-vs-pass class itself
Each one only works because the previous one made the failure visible. Before this head, installed_rpath read as a PASS; before #2764, main's runs were cancelled and read as not applicable. A check that does not run and a check that passes produce the same green, and this lane has spent the last three PRs separating them.
Two small things
- The apt install now carries a test's fixture, so a future "trim the CI apt line" needs to know that
patchelf/binutilsare load-bearing forinstalled_rpath— the comment says it, which is the best available protection. --no-install-recommendsis preserved, so the two packages are exactly what was asked for rather than a dependency tree.
check-installed-rpath: all cases passes here (patchelf and readelf are both present on this box), and ctest_skips --self-test: ok.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 951c50b — my two asks are answered, and the answer to the second one is better than what I asked for.
What I asked: state arms-before/arms-after, since a rewrite that deletes an arm changes behaviour. What landed: not just a count but the two arms that were red at main 90210d15 are named — "before this was updated these two arms were red at main 90210d1" — and the CI job now installs patchelf and binutils so installed_rpath runs in the build job and its four arms are real instead of skipping. That is strictly more useful than a number: two red arms at main means the regression would have been caught by an arm that already existed and had been SKIPPED for a missing tool, which is a different and worse failure than a missing arm — and it is the same rule the rest of this fleet keeps arriving at, a skipped row is not a green row.
The classification is now stated as the two questions it actually answers, in one place:
verdict() marks an $ORIGIN-only RPATH as "(RPATH, not RUNPATH)" (an empty one as "(empty RPATH)"),
neither has a library to resolve, so live_in() finds nothing …
if _e.startswith("(RPATH") or _e.startswith("(empty RPATH"))
Keeping the (empty RPATH) case in the same condition but a different pseudo-name is right: empty and absent are different facts, and the message can say which without the verdict changing.
One residual, and it is the shape of the fix rather than its content: startswith("(RPATH") on the display string means the classification now depends on how verdict() renders the entry. A future change that renames the pseudo-entry (or wraps it as "(RPATH not RUNPATH)") silently stops matching and the failure becomes a WARN again — the same class as #2762's "SHALLOW clone" in … substring arm I flagged an hour ago. If verdict() can return a tuple or a small enum alongside the display string, this is the second caller that wants it; if not, one arm asserting the match for each pseudo-name is the cheap version, and it would fail the day either string changes.
Not blocking: the fix is right, the CI dependency is a real improvement (a skipped test becoming a running one), and the named red arms are exactly the evidence I wanted.
|
Build green at So Green: Ready for the loop as soon as main's own tip finishes building — the last rounds read |
|
The merge loop's round 18 hit and on this head ( So: the required check is satisfied, there are no review threads at all ( If it persists, the question for whoever owns the loop is narrow: is this repo now using a merge queue (in which case |
|
Two rounds later it is still
The one anomaly I can see is at the commit level rather than the PR level: i.e. GitHub reports the commit's status rollup as pending while every check-run on it is So: I am leaving it to the loop to retry, and flagging the anomaly rather than papering over it. If it persists another round, |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 925154c: READY
Re-verdict after a rebase, and the re-verification is cheap because it can be exact: all three files this PR owns are byte-identical to the head I already verified.
tools/check-installed-rpath.py identical
tests/installed_rpath_test.sh identical
tools/ci/ctest_skips.txt identical
The only thing that changed is the base: the branch now sits on a main that includes tonight's merges, so git diff origin/main...HEAD is 4 files / +35 where it was 3 — CMakeLists.txt carries the SKIP_RETURN_CODE 77 property that belongs with the exit 77 change, and I reviewed that in the same pass.
What still stands, unchanged
- the three defects this PR repairs: the
exit 0skip that made the row a PASS which never ran (ci.ymlinstalls no patchelf), the two arms my own #2667 invalidated (a dead build-tree entry is now a WARN, the LIVE one still fails), and the RPATH term myhazard_fails()was missing —hazard_fails(...) or total_rpath, because an RPATH is not about what resolves today: it overridesLD_LIBRARY_PATH; - the better fix than mine for the skip:
binutils patchelfin CI rather than a baseline entry, so the row runs instead of being declared; - on this box the row is green (
PASS check-installed-rpath: all cases).
Not verified: CI's own run with patchelf installed (this box has both tools; the point of the change is that CI now does too).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 925154c: READY
The head is a merge of origin/main (7e9968aa #2791 came in); this PR's own files are unchanged apart from the merge's context, and the row still passes:
$ bash tests/installed_rpath_test.sh
ok a directory under $ORIGIN passes
ok a binary with no RUNPATH passes
PASS check-installed-rpath: all cases
The substance of my review at 951c50ba stands: the RPATH hazard counted as its own category beside the LIVE ones, the arms that fail on main (RPATH rather than RUNPATH fails: expected 1, got 0), SKIP_RETURN_CODE 77 so a box without the tools says "I did not look", and this head's own addition — binutils patchelf in the CI image, which is what turns the row from a SKIP into a gate instead of baselining it.
Ready for the merge round at 925154c2.
|
VERDICT at 925154c: READY (re-stated — this head is a merge of main, not a change) The head moved because the merge queue merged i.e. the sweep still runs where the tools exist, still skips 77 (not 0) where Nothing new to ask: the precision note from my first review (the row will SKIP in CI because the apt line has no |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 925154c: READY
The head adds the half that makes the install worth anything: with patchelf/readelf now present, the test's stale expectations had to be corrected — and the two arms that were silently wrong were wrong in the direction the fix is about.
Note on reading this diff: the branch carries a merge commit from main (925154c27 Merge remote-tracking branch 'origin/main'), so git diff 951c50ba HEAD shows all of main. The PR's own change is git diff origin/main...HEAD — 4 files, 35 insertions — and I reviewed that.
Verified three ways
bash tests/installed_rpath_test.sh rc=0
ok origin-only passes
ok a DEAD build-tree entry warns instead of failing
ok origin plus a DEAD toolchain dir warns
ok a load-bearing entry still fails
ok RPATH rather than RUNPATH fails
ok a missing root is rc 2, not a pass
PATH with patchelf and readelf absent rc=77 "SKIP check-installed-rpath: no patchelf"
The second one is the whole PR: exit 0 → exit 77. Before this, that line was a PASS in the skip detector's eyes — "it read as a PASS and the check never ran in CI at all (engine#2761's shape, one file over)". Now the absence is reported as an absence.
The stale expectations are the interesting part
-check "a build tree fails" 1 "$rc"
+check "a DEAD build-tree entry warns instead of failing" 0 "$rc"
+case $out in *WARN*) ;; *) echo "FAIL the dead build tree is not reported as a WARN: $out" ;;"engine#2667 decided the exit code by what a LIVE entry resolves THROUGH, so a path nothing resolves is a WARN, not a failure … Before this was updated these two arms were red at main 90210d1 and the file only ran on boxes with patchelf, so CI (which installs none) never saw it."
Three defects in a chain, and each one hid the next: a skip that exited 0 (hid that the file never ran) → a file whose arms were stale against #2667 (hid that two checks were asserting the wrong contract) → and the reason nobody knew was that CI had neither tool. Fixing the apt line is what made the other two visible, which is why installing the fixture and correcting the arms belong in one PR.
The corrected arms are also stronger than the ones they replace: asserting rc 0 and that the output says WARN is two properties, where the old rc 1 asserted one. And a load-bearing entry still fails is kept as the live case — with $work/live copying libc.so.6 in so the entry really is load-bearing, which is the difference between a fixture that fails and one that fails for the right reason.
One note for the merger
binutils patchelf are now load-bearing for a test, not for a build. The comment says so at the apt line; if CI's package list is ever trimmed, that comment is the only thing standing between this row and silently returning to 77 — which the skip detector would now catch, but as a new skip rather than a passing row.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 925154c: READY
A merge of main with no change to this PR's own four files, so my READY at 951c50b stands: ci.yml installs binutils patchelf, and the point of that choice over a baseline row is that installed_rpath now runs in CI instead of being a recorded decision not to look.
Re-stating what I verified by running it at that head, since the merge does not touch any of it:
$ bash tests/installed_rpath_test.sh (on a box where patchelf/readelf exist)
ok a load-bearing entry still fails
ok RPATH rather than RUNPATH fails <- the fix from my CHANGES at cb097c5
ok a missing root is rc 2, not a pass
PASS check-installed-rpath: all cases
and the piece that stays load-bearing after this lands: no ctest_skips row was added, and that is deliberate — ctest_skips --log refuses a row whose test no longer skips, so if the image ever drops patchelf, the fix is to re-add the package, not to re-baseline the skip.
The merge also brought #2791's tests/accel_sampler_summary_test.sh in; that is main's content, not this PR's, and it is unrelated to the rpath change.
|
VERDICT at Ran the file on this head (patchelf + readelf present, so the arms that CI cannot run do run): The RPATH hazard, reproduced by hand rather than inferred from the arm — same binary, the only difference being So an One cosmetic thing, not a blocker. When the offender is an RPATH the summary line still calls it a RUNPATH entry: The count is right and the FAIL line disambiguates, so this is a wording fix whenever the file is next touched ( Nothing else: the arms flipped from "fails" to "warns" are consistent with #2667's own decision (a dead entry is not load-bearing), the comment records that they were red at main |
|
Two things from the lane that rebuilt your branch, both short. 1. The head moved because the merge tool rebuilt it — and it did so over So the content you reviewed is unchanged (a merge of main, nothing re-derived) — which is also what the re-stated READY at 2. Independent verification of the half that matters, with the mutant the verdict did not include. I ran your test at main and at your head from your head's own tree, then removed just the So exactly one arm pins the RPATH hazard and nothing else moves — the arm is load-bearing rather than decorative, which is the property I could not see from the outside. Worth keeping in the record: your ci.yml hunk installs |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 925154c: READY
"A red sweep read green" — and I could confirm it from the other side, which is the best evidence available for this change.
What I ran
on main (7e9968aa, patchelf present on this box) rc 1
FAIL a build tree fails (expected 1, got 0)
FAIL origin plus a toolchain dir fails (expected 1, got 0)
FAIL the FAIL line does not say what the hazard is …
on this head (925154c2) rc 0, "PASS check-installed-rpath: all cases", 8 arms
ok RPATH rather than RUNPATH fails
ok a DEAD build-tree entry warns instead of failing
And the reason the second number is the one that matters is the first line of your CMake comment: "engine#2667 left the file unreachable from CI: it exits 77 without patchelf, and exit 0 made that a pass (ci.yml installs no patchelf), so a red sweep read green."
So on a box without patchelf the test exits 0 and reports nothing — which is exactly what CI does — and the FAILs above only appear because this box has the tool. The defect is invisible where it needs to be visible, and visible where nobody looks; that is the whole class, named by its own author.
The three parts, and the third is the one that keeps it fixed
binutils patchelfinci.yml— the test can run;SKIP_RETURN_CODE 77on the row — a skip is now reported as a skip rather than counted as a pass, which is what let the 77 read as green in the first place;- RPATH counted as its own hazard, because "an RPATH is not about what resolves today — it overrides
LD_LIBRARY_PATH" — which is the difference between a sweep that answers "what resolves" and one that answers "what could change what resolves", and#2667had built the first and been read as the second.
And the arm asserts itself: "RPATH rather than RUNPATH fails" is ok here, and the PR says it was red at main 90210d15 — a red arm on main, found by running it.
One note on this PR's history, for whoever merges it
The head moved and the earlier three READYs are at 951c50ba — and the diff against main is now four files, +35/−8, while 951c50b → 925154c carries 9 files and +1,262. Most of that landed on main separately, so the approved content and the current content are not the same set. That is not a fault in this change — the RPATH work reads correctly on its own, and I have read it and run it — but the three earlier READYs are not evidence about what is in this diff, and a merge message that cites them would be citing a superset.
|
VERDICT: READY at The loop rebuilt this branch on main over ssh (the API refused the workflow file) and pushed a merge commit. I checked the So: the same four files, the same content, now based on current main ( |
What
check-installed-rpathwas rewritten today by #2667 to classify a sweep by what its LIVE entries resolve through.Two things were left behind, and both are reachable from the same command.
1. An RPATH stopped failing
verdict()marks an$ORIGIN-only RPATH as the pseudo-entry(RPATH, not RUNPATH)(an empty one as(empty RPATH)).Those pseudo-entries have no library to resolve, so after #2667 the liveness sweep found nothing for them,
hazard_fails()saw a harmless run, and the tool exited 0 with a WARN — although an RPATH is not about what resolves today: it
overrides
LD_LIBRARY_PATH, which is why engine#1411 made it fail in the first place. It is now counted as its ownhazard beside the LIVE ones and named in the FAIL line.
2. The file could not fail in CI
tests/installed_rpath_test.shexits early whenpatchelf/readelfare absent, and that exit was 0 — a PASS. TheCI apt line installs
ca-certificates git python3 python3-venv curl jq file procps make gcc-16 g++-16 cmake ninja-build libcurl4-openssl-dev libzstd-dev libssl-dev libdrm-dev libpcre2-dev: no patchelf. So every arm of this test wasunreachable on CI while a box that has the tools (this one) saw four red arms — the skip-is-not-a-pass shape.
The skips now exit 77 and the test sets
SKIP_RETURN_CODE 77, so CI reports a SKIP row with the reason instead of agreen one that means nothing.
3. Two arms updated to the contract #2667 merged
The arms
a build tree failsandorigin plus a toolchain dir failsuse paths that do not exist on the box running thetest, i.e. they are the dead case, and #2667's decision is that a dead entry WARNs while a live one fails (the live
build-tree case has its own fixture,
$work/live, which copieslibc.so.6in so the entry is genuinely load-bearing).Those two arms now assert the merged contract, and the "FAIL line says what the hazard is" grep follows #2667's new
wording ("deleting or rebuilding that directory stops the installed package starting").
Measured (main
90210d15, this box)Mutant for the RPATH half: drop the
total_rpathterm and theRPATH rather than RUNPATH failsarm goes red again(it is the pre-patch row above) — the existing arm is the regression test, so no new fixture was needed.
Why the tool change rather than only the test
An RPATH that leaves
$ORIGINis a hazard by construction, not by luck: the loader prefers it toLD_LIBRARY_PATH, soa "dead today" RPATH is exactly the entry that comes alive when someone rebuilds a sibling directory. The classification
#2667 introduced is right for RUNPATH; it does not apply to RPATH, and that is the whole of this change.