Advance redbear-full Wayland, greeter, and Qt integration

Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.
This commit is contained in:
2026-04-19 17:59:58 +01:00
parent 370d27f44d
commit 9880e0a5b2
137 changed files with 14176 additions and 2016 deletions
+3
View File
@@ -119,6 +119,9 @@ symlink "../../local/recipes/system/redbear-nmap" "recipes/system/redbear-nm
symlink "../../local/recipes/system/redbear-meta" "recipes/system/redbear-meta"
symlink "../../local/recipes/system/udev-shim" "recipes/system/udev-shim"
symlink "../../local/recipes/system/redbear-sessiond" "recipes/system/redbear-sessiond"
symlink "../../local/recipes/system/redbear-authd" "recipes/system/redbear-authd"
symlink "../../local/recipes/system/redbear-session-launch" "recipes/system/redbear-session-launch"
symlink "../../local/recipes/system/redbear-greeter" "recipes/system/redbear-greeter"
symlink "../../local/recipes/system/redbear-dbus-services" "recipes/system/redbear-dbus-services"
symlink "../../local/recipes/system/redbear-notifications" "recipes/system/redbear-notifications"
symlink "../../local/recipes/system/redbear-upower" "recipes/system/redbear-upower"
+2 -2
View File
@@ -6,7 +6,7 @@
#
# Options:
# --check Run non-interactively, exit 0 on pass, 1 on fail
# --config CONFIG Build config to test (default: redbear-kde)
# --config CONFIG Build config to test (default: redbear-full)
#
# --check mode boots the image, waits for the login prompt, then sends D-Bus
# validation commands via the serial console. Output is captured and parsed.
@@ -28,7 +28,7 @@
set -euo pipefail
CHECK_MODE=0
CONFIG_NAME="redbear-kde"
CONFIG_NAME="redbear-full"
while [[ $# -gt 0 ]]; do
case "$1" in
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/env bash
# test-greeter-qemu.sh — bounded QEMU proof for the Red Bear greeter/auth surface.
set -euo pipefail
usage() {
cat <<'USAGE'
Usage: test-greeter-qemu.sh [--check]
Boot redbear-full in QEMU, log in on the fallback console, and verify the greeter daemon/socket
surface, invalid-login handling, and a bounded successful-login return-to-greeter proof.
USAGE
}
check_mode=0
for arg in "$@"; do
case "$arg" in
--help|-h|help)
usage
exit 0
;;
--check)
check_mode=1
;;
*)
echo "ERROR: unsupported argument $arg" >&2
usage >&2
exit 1
;;
esac
done
firmware=""
for candidate in \
/usr/share/ovmf/x64/OVMF.4m.fd \
/usr/share/OVMF/x64/OVMF.4m.fd \
/usr/share/ovmf/OVMF.fd \
/usr/share/OVMF/OVMF_CODE.fd \
/usr/share/qemu/edk2-x86_64-code.fd
do
if [[ -f "$candidate" ]]; then
firmware="$candidate"
break
fi
done
if [[ -z "$firmware" ]]; then
echo "ERROR: no usable x86_64 UEFI firmware found" >&2
exit 1
fi
arch="${ARCH:-$(uname -m)}"
image="build/$arch/redbear-full/harddrive.img"
if [[ ! -f "$image" ]]; then
echo "ERROR: missing image $image" >&2
echo "Build it first with: ./local/scripts/build-redbear.sh redbear-full" >&2
exit 1
fi
if [[ "$check_mode" -eq 0 ]]; then
exec qemu-system-x86_64 \
-name "Red Bear Greeter Validation" \
-device qemu-xhci \
-smp 4 \
-m 2048 \
-bios "$firmware" \
-chardev stdio,id=debug,signal=off,mux=on \
-serial chardev:debug \
-mon chardev=debug \
-machine q35 \
-device ich9-intel-hda -device hda-output \
-device virtio-net,netdev=net0 \
-netdev user,id=net0 \
-vga none \
-device virtio-gpu \
-drive file="$image",format=raw,if=none,id=drv0 \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-enable-kvm -cpu host
fi
expect <<EOF
log_user 1
set timeout 240
spawn qemu-system-x86_64 -name {Red Bear Greeter Validation} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -enable-kvm -cpu host
expect "login:"
send "root\r"
expect "assword:"
send "password\r"
expect "Type 'help' for available commands."
send "redbear-greeter-check\r"
expect "Red Bear Greeter Runtime Check"
expect "GREETER_HELLO=ok"
send "redbear-greeter-check --invalid root wrong\r"
expect "GREETER_INVALID=ok"
send "redbear-greeter-check --valid root password\r"
expect "GREETER_VALID=ok"
send "shutdown\r"
expect eof
EOF
+5 -4
View File
@@ -97,7 +97,7 @@ if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF
log_user 1
set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -device amd-iommu -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/$config/network.pcap -nographic -vga none -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -device amd-iommu -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/$config/network.pcap -nographic -vga none -drive file=$image,format=raw,if=none,id=drv0,snapshot=on -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1,snapshot=on -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
expect -re {PCI .*1022:1419}
expect "login:"
send "root\r"
@@ -111,8 +111,9 @@ expect "units_initialized_now="
expect "units_initialized_after="
expect "events_drained="
send "shutdown\r"
expect eof
sleep 2
EOF
pkill -f "qemu-system-x86_64.*$image" 2>/dev/null || true
echo "IOMMU first-use validation path completed via guest runtime check"
exit 0
fi
@@ -133,9 +134,9 @@ exec qemu-system-x86_64 \
-netdev user,id=net0 \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/$config/network.pcap" \
-nographic -vga none \
-drive file="$image",format=raw,if=none,id=drv0 \
-drive file="$image",format=raw,if=none,id=drv0,snapshot=on \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-drive file="$extra",format=raw,if=none,id=drv1 \
-drive file="$extra",format=raw,if=none,id=drv1,snapshot=on \
-device nvme,drive=drv1,serial=NVME_EXTRA \
-enable-kvm -cpu host \
$extra_qemu_args
@@ -47,7 +47,7 @@ run_guest_checks() {
require_command() {
local cmd="$1"
local message="$2"
if command -v "$cmd" >/dev/null 2>&1; then
if which "$cmd" >/dev/null 2>&1; then
echo " PASS $message"
else
echo " FAIL $message"
@@ -96,7 +96,7 @@ run_guest_checks() {
echo "--- DRM/KMS ---"
local drm_found=false
if [ -e /usr/bin/redox-drm ] || command -v redox-drm >/dev/null 2>&1; then
if [ -e /usr/bin/redox-drm ] || which redox-drm >/dev/null 2>&1; then
drm_found=true
fi
if $drm_found; then
@@ -111,13 +111,13 @@ run_guest_checks() {
echo " FAIL /scheme/drm does not exist"
failures=$((failures + 1))
fi
if command -v redbear-drm-display-check >/dev/null 2>&1; then
if which redbear-drm-display-check >/dev/null 2>&1; then
echo " NOTE redbear-drm-display-check available (run manually for bounded display validation)"
fi
echo
echo "--- health check summary ---"
if command -v redbear-info >/dev/null 2>&1; then
if which redbear-info >/dev/null 2>&1; then
local report
report="$(redbear-info --json 2>/dev/null || true)"
if [ -n "$report" ]; then
@@ -224,7 +224,7 @@ expect {
"__WAYLAND_LIB_OK__" { }
"__WAYLAND_LIB_FAIL__" { puts "FAIL: libwayland-client missing"; exit 1 }
}
send "command -v evdevd && echo __EVDVD_OK__ || echo __EVDVD_FAIL__\r"
send "which evdevd >/scheme/null && echo __EVDVD_OK__ || echo __EVDVD_FAIL__\r"
expect {
"__EVDVD_OK__" { }
"__EVDVD_FAIL__" { puts "FAIL: evdevd missing"; exit 1 }
@@ -234,7 +234,7 @@ expect {
"__EVDEV_SCH_OK__" { }
"__EVDEV_SCH_FAIL__" { puts "FAIL: /scheme/evdev missing"; exit 1 }
}
send "command -v udev-shim && echo __UDEV_OK__ || echo __UDEV_FAIL__\r"
send "which udev-shim >/scheme/null && echo __UDEV_OK__ || echo __UDEV_FAIL__\r"
expect {
"__UDEV_OK__" { }
"__UDEV_FAIL__" { puts "FAIL: udev-shim missing"; exit 1 }
@@ -254,7 +254,7 @@ expect {
"__FW_DIR_OK__" { }
"__FW_DIR_FAIL__" { puts "FAIL: /lib/firmware missing"; exit 1 }
}
send "command -v redox-drm && echo __DRM_OK__ || echo __DRM_FAIL__\r"
send "test -e /usr/bin/redox-drm && echo __DRM_OK__ || echo __DRM_FAIL__\r"
expect {
"__DRM_OK__" { }
"__DRM_FAIL__" { puts "FAIL: redox-drm missing"; exit 1 }
@@ -279,7 +279,7 @@ usage() {
cat <<'USAGE'
Usage:
./local/scripts/test-phase1-desktop-substrate.sh --guest
./local/scripts/test-phase1-desktop-substrate.sh --qemu [redbear-wayland]
./local/scripts/test-phase1-desktop-substrate.sh --qemu [redbear-full]
USAGE
}
@@ -288,7 +288,7 @@ case "${1:-}" in
run_guest_checks
;;
--qemu)
run_qemu_checks "${2:-redbear-wayland}"
run_qemu_checks "${2:-redbear-full}"
;;
*)
usage
+11 -10
View File
@@ -30,7 +30,7 @@ usage() {
cat <<'USAGE'
Usage: test-phase4-wayland-qemu.sh [--check] [extra qemu args...]
Boot the repo's Wayland profile in QEMU with a VirtIO NIC using UEFI firmware.
Boot the repo's full desktop target in QEMU with a VirtIO NIC using UEFI firmware.
Examples:
./local/scripts/test-phase4-wayland-qemu.sh
@@ -41,7 +41,7 @@ Expected validation path:
display session -> validation launcher -> compositor -> wayland-session
Important:
the current harness uses '-vga std' and today still surfaces llvmpipe in-guest.
the current harness uses QEMU virtio-gpu for the bounded software-path desktop slice.
Treat this as a Phase 4 software-path/runtime smoke check and regression harness.
Hardware-accelerated desktop proof is a separate bare-metal/runtime-driver milestone.
USAGE
@@ -78,12 +78,12 @@ else
fi
arch="${ARCH:-$(uname -m)}"
image="build/$arch/redbear-wayland/harddrive.img"
extra="build/$arch/redbear-wayland/extra.img"
image="build/$arch/redbear-full/harddrive.img"
extra="build/$arch/redbear-full/extra.img"
if [[ ! -f "$image" ]]; then
echo "ERROR: missing image $image" >&2
echo "Build it first with: ./local/scripts/build-redbear.sh redbear-wayland" >&2
echo "Build it first with: ./local/scripts/build-redbear.sh redbear-full" >&2
exit 1
fi
@@ -92,7 +92,7 @@ if [[ ! -f "$extra" ]]; then
fi
echo "=== Red Bear OS Phase 4 Wayland QEMU Launch ==="
echo "Config: redbear-wayland"
echo "Config: redbear-full"
echo "Image: $image"
echo "UEFI: $firmware"
echo
@@ -102,14 +102,14 @@ echo " netctl status"
echo " redbear-phase4-wayland-check"
echo " the validation compositor should own the bounded runtime path"
echo " qt6-wayland-smoke should leave a success marker via wayland-session"
echo " production desktop direction is redbear-kde -> kwin_wayland"
echo " active desktop direction is redbear-full -> kwin_wayland"
echo
if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF
log_user 1
set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-wayland/network.pcap -vga std -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $QEMUFLAGS
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $QEMUFLAGS
expect "login:"
send "root\r"
expect "assword:"
@@ -146,8 +146,9 @@ exec qemu-system-x86_64 \
-device ich9-intel-hda -device hda-output \
-device virtio-net,netdev=net0 \
-netdev user,id=net0 \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/redbear-wayland/network.pcap" \
-vga std \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/redbear-full/network.pcap" \
-vga none \
-device virtio-gpu \
-drive file="$image",format=raw,if=none,id=drv0 \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-drive file="$extra",format=raw,if=none,id=drv1 \
+8 -7
View File
@@ -27,7 +27,7 @@ usage() {
cat <<'USAGE'
Usage: test-phase6-kde-qemu.sh [--check] [extra qemu args...]
Boot or validate the Red Bear OS primary KWin Wayland session surface on redbear-kde.
Boot or validate the Red Bear OS primary KWin Wayland session surface on redbear-full.
USAGE
}
@@ -85,13 +85,13 @@ firmware="$(find_uefi_firmware)" || {
}
arch="${ARCH:-$(uname -m)}"
image="build/$arch/redbear-kde/harddrive.img"
extra="build/$arch/redbear-kde/extra.img"
image="build/$arch/redbear-full/harddrive.img"
extra="build/$arch/redbear-full/extra.img"
extra_qemu_args="${filtered_args[*]:-}"
if [[ ! -f "$image" ]]; then
echo "ERROR: missing image $image" >&2
echo "Build it first with: ./local/scripts/build-redbear.sh redbear-kde" >&2
echo "Build it first with: ./local/scripts/build-redbear.sh redbear-full" >&2
exit 1
fi
@@ -104,7 +104,7 @@ if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF
log_user 1
set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-kde/network.pcap -vga std -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
expect "login:"
send "root\r"
expect "assword:"
@@ -147,8 +147,9 @@ exec qemu-system-x86_64 \
-device ich9-intel-hda -device hda-output \
-device virtio-net,netdev=net0 \
-netdev user,id=net0 \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/redbear-kde/network.pcap" \
-vga std \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/redbear-full/network.pcap" \
-vga none \
-device virtio-gpu \
-drive file="$image",format=raw,if=none,id=drv0 \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-drive file="$extra",format=raw,if=none,id=drv1 \
+5 -4
View File
@@ -79,7 +79,7 @@ if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF
log_user 1
set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/$config/network.pcap -nographic -vga none -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/$config/network.pcap -nographic -vga none -drive file=$image,format=raw,if=none,id=drv0,snapshot=on -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1,snapshot=on -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
expect "login:"
send "root\r"
expect "assword:"
@@ -91,8 +91,9 @@ expect "present=/scheme/serio/0"
expect "present=/scheme/serio/1"
expect "phase3_input_check=ok"
send "shutdown\r"
expect eof
sleep 2
EOF
pkill -f "qemu-system-x86_64.*$image" 2>/dev/null || true
echo "PS/2 serio runtime validation completed via guest runtime check"
exit 0
fi
@@ -112,9 +113,9 @@ exec qemu-system-x86_64 \
-netdev user,id=net0 \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/$config/network.pcap" \
-nographic -vga none \
-drive file="$image",format=raw,if=none,id=drv0 \
-drive file="$image",format=raw,if=none,id=drv0,snapshot=on \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-drive file="$extra",format=raw,if=none,id=drv1 \
-drive file="$extra",format=raw,if=none,id=drv1,snapshot=on \
-device nvme,drive=drv1,serial=NVME_EXTRA \
-enable-kvm -cpu host \
$extra_qemu_args
+16 -34
View File
@@ -91,41 +91,23 @@ pkill -f "qemu-system-x86_64.*$image" 2>/dev/null || true
sleep 1
rm -f "$log_file"
set +e
timeout 120s qemu-system-x86_64 \
-name "Red Bear OS x86_64" \
-device qemu-xhci,id=xhci \
-smp 4 \
-m 2048 \
-bios "$firmware" \
-chardev stdio,id=debug,signal=off,mux=on \
-serial chardev:debug \
-mon chardev=debug \
-machine q35 \
-device ich9-intel-hda -device hda-output \
-device virtio-net,netdev=net0 \
-netdev user,id=net0 \
-object filter-dump,id=f1,netdev=net0,file="build/$arch/$config/network.pcap" \
-nographic -vga none \
-drive file="$image",format=raw,if=none,id=drv0 \
-device nvme,drive=drv0,serial=NVME_SERIAL \
-drive file="$extra",format=raw,if=none,id=drv1 \
-device nvme,drive=drv1,serial=NVME_EXTRA \
-drive file="$usb_img",format=raw,if=none,id=usbdisk \
-device usb-storage,bus=xhci.0,drive=usbdisk \
-enable-kvm -cpu host \
> "$log_file" 2>&1
set -e
expect <<EOF
log_user 1
log_file -noappend $log_file
set timeout 300
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci,id=xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/$config/network.pcap -nographic -vga none -drive file=$image,format=raw,if=none,id=drv0,snapshot=on -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1,snapshot=on -device nvme,drive=drv1,serial=NVME_EXTRA -drive file=$usb_img,format=raw,if=none,id=usbdisk,snapshot=on -device usb-storage,bus=xhci.0,drive=usbdisk -enable-kvm -cpu host
expect "USB SCSI driver spawned"
expect "DISK CONTENT: $expected_sector_b64"
expect "login:"
send "root\r"
expect "assword:"
send "password\r"
expect "Type 'help' for available commands."
send "shutdown\r"
sleep 2
EOF
if ! grep -q "USB SCSI driver spawned" "$log_file"; then
echo "ERROR: usbscsid did not autospawn; see $log_file" >&2
exit 1
fi
if ! grep -Fq "DISK CONTENT: $expected_sector_b64" "$log_file"; then
echo "ERROR: USB storage sector 0 readback did not match the seeded pattern; see $log_file" >&2
exit 1
fi
pkill -f "qemu-system-x86_64.*$image" 2>/dev/null || true
if grep -q "panic\|usbscsid: .*IO ERROR\|usbscsid: startup failed\|usbscsid: event queue error\|usbscsid: scheme tick failed\|bulk .* endpoint stalled" "$log_file"; then
echo "ERROR: USB storage path hit a crash/error; see $log_file" >&2