From 98cd6d94ab0d4d43583e572bbc6ddae887833e95 Mon Sep 17 00:00:00 2001 From: Victor Vogel Date: Thu, 12 Nov 2026 14:30:09 +0000 Subject: [PATCH] tests/install-phone-initramfs: a passing run prints no "Killed" notice Since #682 a passing run prints bash's job notice for the install the suite kills ("line 136: ... Done ... Killed ... exec "$BUNDLE/install" ..."), which in a CI log reads as a failure. The notice comes from the held job's own shell, whose stderr is the suite's, so the 2>/dev/null around the later wait never caught it, and disown wouldn't either (it also stops wait from waiting for the killed run). The held job's stderr now goes to /dev/null; its output is in OUT as before, and the wait is plain. Tested: the suite on main prints the notice and exits 0; on this commit it prints the same ok lines and no notice, exit 0. The tool from before #682 and six sweep mutants (no exclusive check, the shared lock let go after marking, no mark check with and without the run's own directory spared, no mark written, a blocking exclusive lock) still fail it. tools/pr-check and tests/all pass. tests/make-bundle, which also kills a run with SIGKILL, prints no notice. Not tested: a phone (none is needed). Co-Authored-By: Claude Opus 5.5 --- tests/install-phone-initramfs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/install-phone-initramfs b/tests/install-phone-initramfs index e50057a96..ca585a9f4 100755 --- a/tests/install-phone-initramfs +++ b/tests/install-phone-initramfs @@ -214,7 +214,9 @@ done # still be live). held() { # name fd: an install of six waiting at the codename, which fd gives mkfifo "$t/$1.fifo" && eval "exec $2<>\"\$t/$1.fifo\"" - HOLD=$t/$1.fifo OUT=$t/$1.out install six 7>&- 8>&- & + # Its output is in OUT; the job's own shell would print bash's "Killed" + # notice for the one killed below, which in a passing log reads as a failure + HOLD=$t/$1.fifo OUT=$t/$1.out install six 7>&- 8>&- 2>/dev/null & for _ in $(seq 600); do grep -c "Type the phone's codename" "$t/$1.out" >/dev/null 2>&1 && return; sleep 0.1; done cat "$t/$1.out"; fail "an install waits at the codename prompt" } @@ -225,7 +227,7 @@ live=$! held killed 8 kill -KILL "$(cat "$t/killed.out.pid")" exec 8>&- -{ wait $!; } 2>/dev/null || true +wait $! || true both=$(verify_dirs) [[ $(wc -w <<<"$both") == 3 ]] || fail "a second install, killed, leaves its directory and the waiting one's (got: $both)" install six --verify-only || { cat "$t/out"; fail "--verify-only passes while an install waits"; }