Skip to content

Stage 01 no longer aborts on its first line, and the rule that clears a sysroot is tested the way the stage runs it - #38

Merged
DevomB merged 2 commits into
mainfrom
toolchain-id-errexit
Sep 20, 2026
Merged

DevomB merged 2 commits into
mainfrom
toolchain-id-errexit

Conversation

@DevomB

@DevomB DevomB commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Fixes run 35495565368 (76f954a), which died at 01-toolchain.sh:358 three minutes in. The toolchain identity cats the patch sets of glibc, gcc and binutils; only glibc has one, cat exits 1 for the globs that match nothing, and under the stage's errexit, pipefail and ERR trap that ended it before its first step. Nothing was cleared. The cat now ends in || true.

It reached main because the block had only been exercised in a shell without the stage's options. That exercise is now tools/test-toolchain-identity.sh, 14 rows, run under set -Eeuo pipefail with an ERR trap. It fails on its first row against the version that broke CI and passes 14 of 14 against this one. CI's lint job runs every tools/test-*.sh.

Not proven until a Distro run gets past stage 01.

… a sysroot has a test that runs it the way the stage does

Run 35495565368 (76f954a) died three minutes in at 01-toolchain.sh:358. The
toolchain identity hashes the patch sets of glibc, gcc and binutils; only
glibc has one, cat exits 1 for the two globs that match nothing, 2>/dev/null
hides the message and not the status, and under common.sh's errexit,
pipefail and ERR trap that ended the stage before its first step. Nothing
was cleared and nothing was left half done. The cat now ends in `|| true`.

It reached main because the block had only been exercised lifted out of the
stage in a shell without the stage's options, where the same line is
harmless. So the exercise is now a suite, tools/test-toolchain-identity.sh,
and it runs the block under set -Eeuo pipefail with an ERR trap: fourteen
rows covering an empty tree, the same toolchain, another toolchain (cleared,
stamps archived, nothing written into the sysroot), a tree with no record, a
tree with the repository visible inside it (refused, and the stand-in
survives), a tree with something mounted under it, and the mount test
against a space, brackets, a symlink, a sibling name and an unreadable
mounts file. Against the version that broke CI it fails on its first row;
against this one it passes 14 of 14. CI's lint job runs every
tools/test-*.sh, so the next mistake of this kind stops there.
…hrough eval

CI's shellcheck is newer than the development host's and reports SC2034 for the versions the test sets for the lifted block. The suite itself passed in CI, 14 of 14; only the lint step failed.
@DevomB
DevomB merged commit 9329c91 into main Sep 20, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant