test: skip the mode-bit arms when the runner is root #228
No reviewers
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#228
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/ci-root-mode-bits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
node-test (routing, 22)and(routing, 24)have been red onmainsince therunner started executing as root. Three tests in
cadence-core/bin/phase-plans.test.mjschmoda fixture to0o000and assertthat the unreadable plan or archive directory is skipped:
an unreadable plan does the same: no path, one warning, clean below foundthe by-path reader carries the out-of-grammar and unreadable arms tooan unreadable archive directory is skipped, never a throwRoot ignores mode bits, so on the runner the fixtures read back fine, the
"unreadable" plan parses, and all three assertions fail. Every local non-root
run is green, which is the whole local/CI gap - the production code is not
involved.
Guarded with the idiom
planning.test.mjs:4187already uses for its ownmode-bit arm:
Verified by reproduction rather than by assumption, using a user namespace to
get a real uid 0:
unshare -r node --test cadence-core/bin/phase-plans.test.mjsbefore thechange: 27 tests, 3 fail - the same three, by name, that CI reports.
# SKIP root bypasses mode bits.node cadence-core/bin/test.mjs routingexits 0 both as the ordinary user andunder
unshare -r;tsc -p tsconfig.ci.jsonexits 0.risk-check runon the range: no category matched, not inconclusive.The arms still run for every non-root developer and in any non-root runner.