Found in review of #43: tests/view-mail.sh fails at random (view mail left gc events --follow running) #69
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!69
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-r82"
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?
tests/view-mail.shfailed at random with "view mail left gc events --follow running" (run 1663 of #43, a pull request that touches neither the test nor the command).Cause. After the view is killed, its cleanup sends the stub's
gc events --followits signal and the view exits at once. The test looked once withkill -0for the stream, so on a loaded runner it looked before the stream was gone.Change. Each pid the stub recorded is waited for with the test's own
stoppedhelper, up to five seconds, instead of being looked at once. No new shell logic: the helper exists and the loop keeps its shape. A fragment in.changelog/notes it.Same pattern elsewhere. None:
view-beads.shrecords no stream pids and already usesstopped;upgrade.shkills its orphan and does not check it afterwards.The SIGPIPE in
gnu-tools.sh. It has a bead of its own,gascitypacks-cbz, closed by #37 (grep -qunder pipefail); nothing of it is left in the file, so nothing to fix here.Checked.
tests/view-mail.shfive times in a row andtests/view-beads.sh: ok;shellcheck tests/view-mail.sh: clean; the changelog v2 checker from the repository root: pass. Not reproduced: the race itself, which depends on load.Bead: gascitypacks-r82
Review of
ef57db5215for gascitypacks-r82. Checks of the head: success.Verdict
pass
Findings
None that block, and no minor ones.
Verified
tests/view-mail.sh:263: each recorded stream pid now goes through the test's ownstoppedhelper (5 one-second tries,tests/view-mail.sh:51-58) in place of a singlekill -0. The comment at:256-258says why. Nothing else in the loop changed, so no new shell logic was added.cleanup(roles/commands/view/mail/run.sh:54-58) sends the signal togcpidand exits without waiting, and the stub's stream isexec sleep 600, which is orphaned when the view exits. The old test checked once, straight after the view stopped. The oldkill -0passed on most CI runs, so the runner reaps orphans and waiting for them is enough.kill -0appears intests/only in view-mail.sh and view-beads.sh. view-beads.sh uses it only inside its ownstoppedhelper and records no stream pids, as the description says..changelog/view-mail-test-waits-for-stream.mdis a### Fixedfragment, and the PR has a description.origin/main(4a39722, Release 0.7.0) in my own clone: clean, no conflict. The forge saysmergeable.env -i, 0 such variables):bash tests/view-mail.sh3 times in a row: ok each time.bash tests/view-beads.sh: ok.shellcheck tests/view-mail.sh: clean.actions/validateruns it with-base=main: valid=true, exit 0.