Skip to content

tests/install-phone-initramfs: a passing run prints no "Killed" notice - #699

Merged
derekross merged 1 commit into
derekross:mainfrom
only21mil:build/install-phone-test-quiet-kill
Nov 13, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
only21mil:build/install-phone-test-quiet-kill

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

What and why

This follows the first small thing in the maintainer's note on #682: a passing tests/install-phone-initramfs prints bash's job notice for the install it kills, which in a CI log reads as a failure.

The background job's own shell prints it, so the 2>/dev/null around the later wait never caught it. I tried disown: the notice stays, and wait stops waiting for the killed run. So that job's stderr now goes to /dev/null; its output still goes to its OUT file, which the suite prints on a failure.

I captured the before run on main 1d4df112 before changing the test, then repeated it on 98cd6d94. Current green main adda276a leaves the test unchanged and merges cleanly with the candidate. The suite exits 0 on that main and on the local merged tree, with the notice only on main. Each block leaves out the same 11 ok lines (grep -v '^ok - ').

$ git rev-parse --short HEAD
1d4df112
$ tests/install-phone-initramfs; echo "exit $?"
# mkbootimg: /usr/bin/mkbootimg
tests/install-phone-initramfs: line 136: 2020739 Done                       { printf '%s\n' alice 1234 1234 "" UTC "" "" "" "$t/owner.pub"; if [[ -n ${HOLD:-} ]]; then
    cat "$HOLD";
else
    echo "$cn";
fi; }
     2020740 Killed                     | ( umask 077; echo "$BASHPID" > "${OUT:-$t/out}.pid"; HOME=$t/home PATH="$t/fbin:$PATH" exec "$BUNDLE/install" --unsigned --work "$t/work" "$@" ) > "${OUT:-$t/out}" 2>&1
exit 0
$ git rev-parse --short HEAD
98cd6d94
$ tests/install-phone-initramfs; echo "exit $?"
# mkbootimg: /usr/bin/mkbootimg
exit 0

No new test: the runs above are the check. The suite still fails with the tool from before #682 and with each of six broken sweeps (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). tests/make-bundle also kills a run with SIGKILL and prints no notice.

Device and build

  • Phone: none: tests only
  • Kernel release (uname -r): none
  • Packages changed, with versions: none

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages passes (or the packages I touched: none)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build
  • Runbook steps passed (plan, step, result): none, no plan step
  • What I did not test: a phone, and a shell other than bash 5.3
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)
tools/phone-smoke report

Not applicable: the change is to a test's output on the laptop, and nothing in it runs on a phone (CONTRIBUTING.md §6.5).

Generated with Claude Opus 5.5 in T3 Code Nightly

Since derekross#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
derekross#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 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks, @only21mil. That is the first of the two small things from #682, and the explanation is the useful part: the notice comes from the held job's own shell, so the redirect round wait never caught it, and disown, which I had suggested, leaves it too (I tried it after reading your note).

I ran it merged onto today's main: with main's test file the "Killed" notice is printed and the suite passes; with yours there is no notice and the same eleven ok lines. The installer's own output still goes to its OUT file, which the suite prints on a failure, and with the installer from before #682 the suite still fails at "a run with no other live removes a killed install's directory". Merging.

@derekross
derekross merged commit 476dbcf into derekross:main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants