qemu: ui-drive --init-chain and the assert_ui_chain verb (flare-edge#2210) #33

Merged
noah merged 2 commits from rb/ln-init-chain-boot into rebuild 2026-10-28 12:30:25 -06:00
Owner

Second half of the SDK side of flare-edge#2210 part 2, stacked on #32 (merged).

  • ui-drive.sh --init-chain DIR lays the panel's init scripts over the rootfs (ROOTFS_OVERLAY) and boots with warden.initchain. It refuses a missing directory, or one without etc/init.d/S99lvgl, before anything is built.
  • qmp.py verb assert_ui_chain [ACCOUNT] reads the guest over the control channel (@procs, @cat). It fails unless exactly one warden-ui and one warden-ui-run loop run, the UI's real, effective, saved and filesystem uids all equal the account's (never 0), /run/warden/ui-safe-mode is absent, and /tmp/warden-ui.log holds no exit or refusal line from warden-ui-run.
  • qemu/tests/scripts/init-chain-ui.txt: sleep 90, then the assert (about T+120 s after boot).
  • README: the --init-chain option.

Tests

Rebuild f46a3519 merged in; run on bfe-mpc-0056 via lane-remote.

python3 qemu/tests/test_qmp_drive.py      Ran 83 tests ... OK   (UiChainVerb: 12 new, among them the #1903 case)
python3 qemu/tests/imgtools.py selftest   ok
bash qemu/tests/rootfs-overlay.sh         [PASS] ui-drive.sh: a chain directory with S99lvgl passes its checks
                                          rootfs-overlay: all scenarios passed
bash qemu/tests/init-chain-test.sh        init-chain: 19 checks / all checks passed
bash qemu/tests/payload-dir.sh            payload-dir: all scenarios passed
bash qemu/tests/seed-dir.sh               ALL SEED_DIR TESTS PASSED

Mutants (earlier pass): 6 of 6 caught. Local shellcheck over ui-drive.sh and rootfs-overlay.sh is clean.

0056 has no qemu-system-arm, so no VM was booted here. The first real boot is the flare-edge job "QEMU UI shipped init chain", which follows once this merges and the vendor/warden-sdk pin moves.

Refs flare-edge#2210

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

Second half of the SDK side of flare-edge#2210 part 2, stacked on #32 (merged). - `ui-drive.sh --init-chain DIR` lays the panel's init scripts over the rootfs (ROOTFS_OVERLAY) and boots with `warden.initchain`. It refuses a missing directory, or one without etc/init.d/S99lvgl, before anything is built. - `qmp.py` verb `assert_ui_chain [ACCOUNT]` reads the guest over the control channel (@procs, @cat). It fails unless exactly one warden-ui and one warden-ui-run loop run, the UI's real, effective, saved and filesystem uids all equal the account's (never 0), /run/warden/ui-safe-mode is absent, and /tmp/warden-ui.log holds no exit or refusal line from warden-ui-run. - `qemu/tests/scripts/init-chain-ui.txt`: sleep 90, then the assert (about T+120 s after boot). - README: the --init-chain option. ## Tests Rebuild f46a3519 merged in; run on bfe-mpc-0056 via lane-remote. ``` python3 qemu/tests/test_qmp_drive.py Ran 83 tests ... OK (UiChainVerb: 12 new, among them the #1903 case) python3 qemu/tests/imgtools.py selftest ok bash qemu/tests/rootfs-overlay.sh [PASS] ui-drive.sh: a chain directory with S99lvgl passes its checks rootfs-overlay: all scenarios passed bash qemu/tests/init-chain-test.sh init-chain: 19 checks / all checks passed bash qemu/tests/payload-dir.sh payload-dir: all scenarios passed bash qemu/tests/seed-dir.sh ALL SEED_DIR TESTS PASSED ``` Mutants (earlier pass): 6 of 6 caught. Local shellcheck over ui-drive.sh and rootfs-overlay.sh is clean. 0056 has no qemu-system-arm, so no VM was booted here. The first real boot is the flare-edge job "QEMU UI shipped init chain", which follows once this merges and the vendor/warden-sdk pin moves. Refs flare-edge#2210 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 2 commits 2026-10-28 11:40:27 -06:00
qemu: ui-drive --init-chain and the assert_ui_chain verb (flare-edge#2210)
ci / qemu-tools (push) Successful in 3m26s
ci / test (push) Successful in 25s
ci / bench (push) Successful in 18s
ci / mcdc (push) Successful in 32s
ci / quality (push) Successful in 35s
ci / badges (push) Skipped
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 24s
ci / kernel-symbols (push) Successful in 5m45s
f04a31dc06
ui-drive.sh --init-chain DIR lays the panel's scripts over the rootfs
(ROOTFS_OVERLAY) and boots with warden.initchain; it refuses a missing
directory or one without etc/init.d/S99lvgl before anything is built.

qmp.py assert_ui_chain [ACCOUNT] reads the guest over the control channel
(@procs, @cat) and fails unless exactly one warden-ui and one warden-ui-run
loop run, the UI's real, effective, saved and filesystem uids are all the
account's (never 0), the safe-mode flag is absent and /tmp/warden-ui.log
holds no exit or refusal of warden-ui-run. tests/scripts/init-chain-ui.txt
runs it at about T+120 s.

Tests: UiChainVerb in test_qmp_drive.py (12 cases, among them the #1903
case: no UI, safe mode, three exits); 6 of 6 mutants caught.
rootfs-overlay.sh gains the three ui-drive.sh --init-chain checks.

Refs flare-edge#2210

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
Merge remote-tracking branch 'origin/rebuild' into rb/ln-init-chain-boot
ci / test (push) Skipped
ci / mcdc (push) Skipped
ci / bench (push) Skipped
ci / qemu-tools (push) Skipped
ci / kernel-symbols (push) Skipped
ci / patches-apply (push) Skipped
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Skipped
ci / badges (push) Skipped
ci / bench (pull_request) Successful in 20s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 42s
ci / test (pull_request) Successful in 15s
ci / mcdc (pull_request) Successful in 1m3s
ci / kernel-symbols (pull_request) Successful in 5m24s
ci / qemu-tools (pull_request) Successful in 1m58s
ci / patches-apply (pull_request) Successful in 31s
ci / badges (pull_request) Skipped
333c237949
noah merged commit 6e51f1a0e5 into rebuild 2026-10-28 12:30:25 -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#33