Merge pull request 'QEMU: allow seeded flow setup' (#14) from qemu-bt-flow-fixture into flare-edge-next
ci / test (push) Successful in 12s
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 5s
ci / qemu-tools (push) Successful in 44s
ci / patches-apply (push) Successful in 14s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 29s
ci / badges (push) Skipped
ci / test (push) Successful in 12s
ci / mcdc (push) Successful in 13s
ci / bench (push) Successful in 5s
ci / qemu-tools (push) Successful in 44s
ci / patches-apply (push) Successful in 14s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
ci / quality (push) Successful in 29s
ci / badges (push) Skipped
This commit was merged in pull request #14.
This commit is contained in:
@@ -85,6 +85,11 @@ does on a panel instead of rejecting every attempt. `qemu_stage_rootfs()`
|
||||
the executable bit, so the checked-out source file's own mode depends on the
|
||||
checking-out umask and cannot be trusted to arrive non-world-readable.
|
||||
|
||||
A flow seed may contain `qemu-flow-setup.sh`. Stage-2 init runs it inside the
|
||||
disposable guest after mounting userdata and before starting daemons or the
|
||||
UI. A nonzero exit stops the boot. Use it only for test devices and commands
|
||||
that the virt machine does not provide.
|
||||
|
||||
## Scenarios
|
||||
|
||||
All take the virt-fragment `<zImage>`; `FLARE_EDGE=<checkout>` where noted.
|
||||
|
||||
@@ -57,6 +57,16 @@ mount_fatal userdata /userdata
|
||||
mount_fatal "oem${slot}" /oem
|
||||
mkdir -p /userdata/warden
|
||||
|
||||
# A flow may seed an opt-in guest fixture before the UI and payload daemons
|
||||
# start. The file lives only in this disposable QEMU disk image. Fail the
|
||||
# boot if setup fails so a flow cannot pass against an unprepared guest.
|
||||
if [ -f /userdata/warden/qemu-flow-setup.sh ]; then
|
||||
if ! /bin/busybox sh /userdata/warden/qemu-flow-setup.sh; then
|
||||
echo "FATAL: QEMU flow setup failed"
|
||||
poweroff -f
|
||||
fi
|
||||
fi
|
||||
|
||||
# RS485: warden-modbus hardcodes /dev/ttyS4 at compile time; alias it to the
|
||||
# VM's RS485 pci-serial UART (needs the virt.fragment kernel). run.sh lists
|
||||
# the control channel's port first when there is one (warden.ctl on the
|
||||
|
||||
Reference in New Issue
Block a user