Repository navigation
fix: build-gvproxy_test.sh matches the build error text with no pipe, so a matching error always - #3359
Conversation
printf piped into grep -q can fail under pipefail when grep exits early and printf takes SIGPIPE, so a matching error read as a mismatch.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none. |
|
Round 1 of 10 on a failed check suite: the coder changed nothing. Revise round 1: no new commit. Commit 1755a47 already does the task. The failed checks are test-kvm and its aggregator ci-linux-kvm-success. That lane runs the VM integration harnesses from ci-linux-kvm.yml, and this script is not one of them. The log excerpt shows no failed step for this change, so I treat it as a KVM runner failure and recommend a re-run. The shell_harnesses test fails on this box in metrics_test.sh (missing_nextest_fails_mutants_mode). cargo-nextest is in /usr/bin here, so the check removes /usr/bin from PATH, and bash and python3 go with it (exit 127). This branch does not change metrics_test.sh. build-gvproxy_test.sh passes inside that same run. |
There was a problem hiding this comment.
Read at 1755a47.
Right fix, and the stricter match is the correct one. A case on $err has no pipe, so neither pipefail nor a SIGPIPE to printf can turn a matching error into a failed check. The quoted pattern is a literal substring match, so the . in patch.$patch_name= now means a dot rather than any character, which is what the lock line actually says. The three checks keep their exact messages, and $patch_name stays inside the quotes, so a name with a glob character cannot change the pattern.
One note, not blocking: scripts/metrics_test.sh has the same printf '%s' "$x" | grep -q shape at two places (the quality-gate line and the clippy-strict line). The failure the agent saw there was a different case, but the shape is the same trap; worth a sibling task so the next flake of that kind does not get diagnosed twice.
There was a problem hiding this comment.
Reviewed at 1755a47ddeb7 against D3050's plan block. The three error checks in scripts/build-gvproxy_test.sh now use a case glob match instead of printf | grep -q. Under pipefail, an early grep -q exit can SIGPIPE the printf and turn a match into a miss, which is the intermittent false negative in #3050. The glob also matches patch.$patch_name= literally, where grep read . as a wildcard. The change is within the task's one layer, and no other file is touched. Round 1's no-op is right: the test-kvm failure was not this change, and it is green on the re-run.
Defect
Fixes #3347
scripts/build-gvproxy_test.shTask marker
Proof
bash scripts/build-gvproxy_test.sh now reports 9 passed, 0 failed on every run (30 repeated runs, no failure). The three error-text checks use a case match on $err, so no pipe exists for pipefail or SIGPIPE to fail when the build prints the expected error.
Notes from the agent: The shell_harnesses test fails only because of scripts/metrics_test.sh. Its case missing_nextest_fails_mutants_mode fails ('mutants mode without nextest exit 127', 'not_measured: '). This task does not touch that script, and the failure looks environmental on this box. build-gvproxy_test.sh reports ok inside the same harness run. Note: the case match is a literal substring match. The old grep treated '.' in 'patch.$patch_name=' as a regex wildcard, so the new check is slightly stricter.
Tests
bash scripts/build-gvproxy_test.shcargo test -p common --test shell_harnesses all_script_test_harnesses_passVerify
min task run agent-verifypassed ([tasks.verify]).