Repository navigation
Conversation
The check-specs selftest asserted on captured output with `printf '%s' "$out" | grep -q ...`. grep -q exits on the first match; when the captured run output exceeds the 64 KiB pipe buffer (Linux CI, not macOS where the buffer never fills), printf dies with SIGPIPE mid-write and the pipeline status no longer reflects the match, failing the assertion. Read the variable through a herestring instead: no pipe, no writer to signal, same grep exit status. Detected by the check workflow's docs leg failing on main while the same selftest passes locally. Signed-off-by: thxCode <thxcode0824@gmail.com>
|
✅ OpenCodeReview: Review skipped: no items were selected. |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
/area testing
What this PR does / why we need it:
The
checkworkflow's docs leg fails on Linux CI while the same selftest passes on macOS. Root cause:check-specs-selftest.shasserts on captured run output withprintf '%s' "$out" | grep -q ....grep -qexits on the first match; when the captured output exceeds the 64 KiB pipe buffer,printfis still writing, dies with SIGPIPE, and the pipeline status no longer reflects the match — the assertion fails although the pattern is present. macOS never fills the buffer for these outputs, so the failure is Linux-only.Fix: read the variable through a herestring (
grep -q ... <<< "$out"). No pipe, no writer to signal, samegrepexit status. All five assertion sites in the script are converted; no otherprintf | greppipelines exist in the file.Which issue(s) this PR links to:
None — the failure was observed directly in the
checkworkflow onmain.Special notes for your reviewer:
Verified locally:
bash -nclean, selftest passes (SELFTEST PASSED: every rule was seen to fail on the shape it claims to catch),make lint agents-shellgreen. The fix is semantics-preserving (identical grep exit status) and removes the signal by construction.Does this PR introduce a user-facing change?