qemu: PAYLOAD_DIR lets one run boot its own payload set #31

Merged
noah merged 4 commits from rb/ln-hook-payload into rebuild 2026-10-27 19:37:41 -06:00
Owner

Lets one QEMU run boot its own payload set, so flare-edge can boot the hook set (production payload plus the test-flavor warden-ui and wthctl) only for a flow that pins documents through the UI test hook, while every other flow in a batch keeps reading qemu/payload. Refs flare-edge #2054. Fixes #30.

Parts:

  • qemu/mkimage.sh: PAYLOAD_DIR (default qemu/payload) is copied into /usr/bin of both rootfs slots; a PAYLOAD_DIR that is not a directory fails closed. ui-drive.sh checks for warden-ui in the same directory.
  • qemu/tests/payload-dir.sh (14 checks): builds images on a copy of qemu/ and reads both slots back with debugfs. Wired into CI.
  • qemu/tests/test_qmp_drive.py (Fixes #30): every temp dir the module makes lands under one per-run root removed at exit (a run used to leave about 40 dirs in $TMPDIR); regression class TempDirs runs one test of each kind in a child under a fresh TMPDIR and checks it is empty afterwards.
  • READMEs (qemu/README.md, qemu/payload/README.md).

Local gate (bfe-mpc-0056, head eebfd23; this head only adds the merge of origin/rebuild bd4eb5c, whose tree change is #29 already on the branch, so the tree is identical):

  • qemu/tests/payload-dir.sh: all passed; 2 mutants of mkimage.sh caught.
  • qemu/tests/seed-dir.sh: passed.
  • python3 qemu/tests/test_qmp_drive.py: 71 tests OK; a cleanup mutant caught.
  • shellcheck -x qemu/.sh qemu/tests/.sh: clean.
  • flare-edge side (rb/w31-hook-set, stacked on flare-edge #2080) uses PAYLOAD_DIR: run-flowc-tests.sh ALL FLOWC TESTS PASSED (264 PASS), lane-prepush all steps passed.

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

Lets one QEMU run boot its own payload set, so flare-edge can boot the hook set (production payload plus the test-flavor warden-ui and wthctl) only for a flow that pins documents through the UI test hook, while every other flow in a batch keeps reading qemu/payload. Refs flare-edge #2054. Fixes #30. Parts: - qemu/mkimage.sh: PAYLOAD_DIR (default qemu/payload) is copied into /usr/bin of both rootfs slots; a PAYLOAD_DIR that is not a directory fails closed. ui-drive.sh checks for warden-ui in the same directory. - qemu/tests/payload-dir.sh (14 checks): builds images on a copy of qemu/ and reads both slots back with debugfs. Wired into CI. - qemu/tests/test_qmp_drive.py (Fixes #30): every temp dir the module makes lands under one per-run root removed at exit (a run used to leave about 40 dirs in $TMPDIR); regression class TempDirs runs one test of each kind in a child under a fresh TMPDIR and checks it is empty afterwards. - READMEs (qemu/README.md, qemu/payload/README.md). Local gate (bfe-mpc-0056, head eebfd23; this head only adds the merge of origin/rebuild bd4eb5c, whose tree change is #29 already on the branch, so the tree is identical): - qemu/tests/payload-dir.sh: all passed; 2 mutants of mkimage.sh caught. - qemu/tests/seed-dir.sh: passed. - python3 qemu/tests/test_qmp_drive.py: 71 tests OK; a cleanup mutant caught. - shellcheck -x qemu/*.sh qemu/tests/*.sh: clean. - flare-edge side (rb/w31-hook-set, stacked on flare-edge #2080) uses PAYLOAD_DIR: run-flowc-tests.sh ALL FLOWC TESTS PASSED (264 PASS), lane-prepush all steps passed. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
noah added 4 commits 2026-10-27 19:04:59 -06:00
qemu: PAYLOAD_DIR lets one run boot its own payload set
ci / kernel-build (push) Canceled after 0s
ci / quality (push) Canceled after 0s
ci / badges (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / mcdc (push) Canceled after 0s
ci / bench (push) Canceled after 0s
ci / qemu-tools (push) Canceled after 0s
ci / kernel-symbols (push) Canceled after 0s
ci / patches-apply (push) Canceled after 0s
ci / prune-artifacts (push) Canceled after 0s
9998182ef5
mkimage.sh copies PAYLOAD_DIR (default qemu/payload) into /usr/bin of both
slots and fails closed when it is not a directory; ui-drive.sh checks for
warden-ui in the same directory. flare-edge boots the hook set (production
payload plus the test-flavor UI and wthctl) for a flow that pins documents
while the other flows of a batch keep reading qemu/payload (flare-edge#2054).

qemu/tests/payload-dir.sh builds the images on a copy of qemu/ and reads
both rootfs slots back with debugfs; wired into CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
qemu: payload-dir.sh uses if blocks (shellcheck SC2015)
ci / test (push) Successful in 19s
ci / bench (push) Successful in 13s
ci / quality (push) Successful in 1m35s
ci / badges (push) Skipped
ci / mcdc (push) Successful in 14s
ci / qemu-tools (push) Successful in 2m47s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 39s
ci / kernel-symbols (push) Canceled after 4m16s
06b86e68b4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG
qemu: test_qmp_drive.py removes its temp dirs (Fixes #30)
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 5s
ci / prune-artifacts (push) Skipped
ci / test (push) Successful in 10s
ci / qemu-tools (push) Successful in 1m22s
ci / kernel-build (push) Skipped
ci / patches-apply (push) Successful in 48s
ci / quality (push) Successful in 57s
ci / badges (push) Skipped
ci / kernel-symbols (push) Successful in 4m7s
eebfd23a96
Every temp dir the module makes (a drive's out dir per run_script, the
console and QMP socket dirs) now lands under one root per run, removed at
exit; a run used to leave about 40 dirs in $TMPDIR. TempDirs runs one test
of each kind in a child under a fresh TMPDIR and checks it is empty after.

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-hook-payload
ci / test (pull_request) Successful in 33s
ci / kernel-build (pull_request) Skipped
ci / patches-apply (pull_request) Successful in 44s
ci / mcdc (push) Skipped
ci / bench (push) Skipped
ci / test (push) Skipped
ci / patches-apply (push) Skipped
ci / kernel-build (push) Skipped
ci / qemu-tools (push) Skipped
ci / kernel-symbols (push) Skipped
ci / prune-artifacts (push) Skipped
ci / quality (push) Skipped
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 26s
ci / bench (pull_request) Successful in 9s
ci / quality (pull_request) Successful in 2m10s
ci / prune-artifacts (pull_request) Skipped
ci / qemu-tools (pull_request) Successful in 2m36s
ci / badges (pull_request) Skipped
ci / kernel-symbols (pull_request) Successful in 4m29s
de1b973aa4
noah merged commit 7d5686e287 into rebuild 2026-10-27 19:37:41 -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#31