qemu: ui-drive waits for the chain start on an init-chain boot (flare-edge#2295) #34

Merged
noah merged 1 commits from rb/ln-init-chain-wait into rebuild 2026-10-28 18:00:15 -06:00
Owner

Fixes flare-edge#2295.

What was wrong

ui-drive.sh --init-chain (#33) boots with warden.initchain. On that boot sbin/init starts the UI through the panel's S99lvgl and prints init: chain started N script(s). It never prints the direct-start line init: starting warden-ui, but ui-drive.sh still waited for that line. So the first flare-edge "QEMU UI shipped init chain" run (integration run 9341, job 99350) failed after 180 s with warden-ui never started on a chain that had booted cleanly (console: S03warden-accounts ok, rig bus up, S99lvgl Starting Warden UI: OK, init: chain started 2 script(s)).

Change

  • New qemu/tests/ui-start.sh, sourced by ui-drive.sh and ui-shot.sh. wait_ui_started picks the console marker by mode. On a chain boot it fails at once on WARDEN-QEMU-INITCHAIN-EMPTY or init: chain S99lvgl start FAILED rc=N, instead of at the deadline.
  • ui-drive.sh waits in chain mode exactly when --init-chain is given. ui-shot.sh stays in direct mode.
  • New CI step: bash qemu/tests/ui-start-test.sh.

Tests (on bfe-mpc-0056, through lane-remote)

$ lane-remote LN <worktree> -- bash -c 'bash qemu/tests/ui-start-test.sh; WARDEN_TEST_SH="busybox sh" bash qemu/tests/init-chain-test.sh | tail -1; bash qemu/tests/rootfs-overlay.sh | tail -2'
[PASS] chain console counts as started in chain mode (flare-edge#2295)
[PASS] the same console is not a direct start (the 99350 failure)
[PASS] an empty chain fails at once, not at the deadline
[PASS] a failed S99lvgl fails at once
[PASS] a dead VM fails at once with its own message
...
ui-start: 27 checks, OK
init-chain: all checks passed
rootfs-overlay: all scenarios passed
  • With the old ui-drive.sh, the test fails 4 checks.
  • The test checks every marker against sbin/init and etc/warden-lib.sh (the S99lvgl failure line comes from the real warden_init_chain with a failing stub). A future rename of a console line therefore fails here, not in a 3-minute VM job.
  • shellcheck -x on the four touched scripts: clean.

After this merges, flare-edge bumps vendor/warden-sdk so job 99350 goes green.

Generated with Claude Code
https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG

Fixes flare-edge#2295. ## What was wrong `ui-drive.sh --init-chain` (#33) boots with `warden.initchain`. On that boot `sbin/init` starts the UI through the panel's S99lvgl and prints `init: chain started N script(s)`. It never prints the direct-start line `init: starting warden-ui`, but ui-drive.sh still waited for that line. So the first flare-edge "QEMU UI shipped init chain" run (integration run 9341, job 99350) failed after 180 s with `warden-ui never started` on a chain that had booted cleanly (console: S03warden-accounts ok, rig bus up, S99lvgl `Starting Warden UI: OK`, `init: chain started 2 script(s)`). ## Change - New `qemu/tests/ui-start.sh`, sourced by ui-drive.sh and ui-shot.sh. `wait_ui_started` picks the console marker by mode. On a chain boot it fails at once on `WARDEN-QEMU-INITCHAIN-EMPTY` or `init: chain S99lvgl start FAILED rc=N`, instead of at the deadline. - ui-drive.sh waits in chain mode exactly when `--init-chain` is given. ui-shot.sh stays in direct mode. - New CI step: `bash qemu/tests/ui-start-test.sh`. ## Tests (on bfe-mpc-0056, through lane-remote) ``` $ lane-remote LN <worktree> -- bash -c 'bash qemu/tests/ui-start-test.sh; WARDEN_TEST_SH="busybox sh" bash qemu/tests/init-chain-test.sh | tail -1; bash qemu/tests/rootfs-overlay.sh | tail -2' [PASS] chain console counts as started in chain mode (flare-edge#2295) [PASS] the same console is not a direct start (the 99350 failure) [PASS] an empty chain fails at once, not at the deadline [PASS] a failed S99lvgl fails at once [PASS] a dead VM fails at once with its own message ... ui-start: 27 checks, OK init-chain: all checks passed rootfs-overlay: all scenarios passed ``` - With the old ui-drive.sh, the test fails 4 checks. - The test checks every marker against `sbin/init` and `etc/warden-lib.sh` (the S99lvgl failure line comes from the real `warden_init_chain` with a failing stub). A future rename of a console line therefore fails here, not in a 3-minute VM job. - shellcheck -x on the four touched scripts: clean. After this merges, flare-edge bumps `vendor/warden-sdk` so job 99350 goes green. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 1 commit 2026-10-28 17:17:41 -06:00
qemu: ui-drive waits for the chain start on an init-chain boot (flare-edge#2295)
ci / test (pull_request) Successful in 24s
ci / mcdc (pull_request) Successful in 17s
ci / badges (push) Skipped
ci / test (push) Successful in 9s
ci / qemu-tools (push) Successful in 1m27s
ci / bench (pull_request) Successful in 5s
ci / mcdc (push) Successful in 12s
ci / bench (push) Successful in 5s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 43s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 24s
ci / quality (pull_request) Successful in 2m35s
ci / kernel-symbols (pull_request) Successful in 5m7s
ci / quality (push) Successful in 1m28s
ci / qemu-tools (pull_request) Successful in 1m36s
ci / badges (pull_request) Skipped
ci / kernel-symbols (push) Successful in 5m2s
a9f2b9b26a
ui-drive.sh --init-chain boots with warden.initchain, where sbin/init starts
the UI through the panel's S99lvgl and prints "init: chain started N
script(s)"; the direct-start line "init: starting warden-ui" is never
printed. ui-drive.sh still waited for that line, so the first flare-edge
"QEMU UI shipped init chain" run (job 99350) gave "warden-ui never started"
after 180 s on a chain that had booted cleanly.

The wait moves to qemu/tests/ui-start.sh (sourced by ui-drive.sh and
ui-shot.sh): wait_ui_started picks the marker by mode and, on a chain boot,
fails at once on WARDEN-QEMU-INITCHAIN-EMPTY or a failed S99lvgl instead of
at the deadline.

Tests: new qemu/tests/ui-start-test.sh (27 checks, in CI): every marker is
the one sbin/init or warden-lib.sh prints in that mode, the job 99350
console counts as started in chain mode, empty and failed chains fail fast,
a dead VM and a silent console fail with their own messages, and both
drivers wait through the helper. The old ui-drive.sh fails 4 checks.

Fixes flare-edge#2295

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah merged commit 4ff7c19537 into rebuild 2026-10-28 18:00:15 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#34