From ded5f7e035b26fa3127252b0e09ed2afe461e5f2 Mon Sep 17 00:00:00 2001 From: File Magic Date: Thu, 13 Aug 2026 19:17:24 -0400 Subject: [PATCH] iso-test.sh [13-inch-thin-cannon/tests]: QEMU_EXTRA debug flag + per-unit failure journals on boot verify --- 13-inch-thin-cannon/tests/iso-test.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/13-inch-thin-cannon/tests/iso-test.sh b/13-inch-thin-cannon/tests/iso-test.sh index 8c99b4f..d042a9a 100755 --- a/13-inch-thin-cannon/tests/iso-test.sh +++ b/13-inch-thin-cannon/tests/iso-test.sh @@ -28,6 +28,9 @@ MONITOR_PORT="${MONITOR_PORT:-5555}" SERIAL_PORT="${SERIAL_PORT:-5557}" PASS="${PASS:-test-passphrase-13-inch-thin-cannon}" RAM="${RAM:-6144}" +# Extra flags appended to every qemu-system-x86_64 invocation (e.g. +# QEMU_EXTRA="-global ICH9-LPC.noreboot=on" to disable the emulated TCO reset) +QEMU_EXTRA="${QEMU_EXTRA:-}" command -v qemu-system-x86_64 >/dev/null || { echo "ERROR: qemu-system-x86_64 not found"; exit 1; } @@ -89,7 +92,7 @@ phase_live() { chmod 600 "$OVMF_VARS" stop_vm - qemu-system-x86_64 $(qemu_base) \ + qemu-system-x86_64 $(qemu_base) $QEMU_EXTRA \ -cdrom "$iso" \ -serial "file:$SERIAL_LOG_LIVE" \ -pidfile "$TESTS_DIR/qemu.pid" \ @@ -152,7 +155,7 @@ phase_install() { # internal nix-build is a no-op against the live store. No host 9p share. stop_vm - qemu-system-x86_64 $(qemu_base) \ + qemu-system-x86_64 $(qemu_base) $QEMU_EXTRA \ -cdrom "$iso" \ -serial "file:$SERIAL_LOG_LIVE" \ -pidfile "$TESTS_DIR/qemu.pid" \ @@ -209,7 +212,7 @@ phase_boot() { stop_vm rm -f "$SERIAL_LOG_BOOT" - qemu-system-x86_64 $(qemu_base) \ + qemu-system-x86_64 $(qemu_base) $QEMU_EXTRA \ -serial "tcp:127.0.0.1:$SERIAL_PORT,server=on,wait=off" \ -monitor "tcp:127.0.0.1:$MONITOR_PORT,server=on,wait=off" \ -pidfile "$TESTS_DIR/qemu.pid" \ @@ -323,6 +326,19 @@ phase_boot() { echo " FAIL: failed services:" echo "$failed" fail=1 + echo "--- Failure detail (journal per failed unit) ---" + ssh_cmd ' + for u in $(systemctl --failed --no-legend --no-pager --plain | awk "{print \$1}"); do + echo "===== $u =====" + journalctl -b -u "$u" --no-pager -n 6 2>/dev/null + done + echo "===== /etc/nixos =====" + ls -la /etc/nixos 2>&1 | head -5 + echo "===== /persistent/etc =====" + ls /persistent/etc 2>&1 | head -15 + echo "===== /swap =====" + ls -la /swap 2>&1 + ' fi echo "=== Boot phase $([ "$fail" = 0 ] && echo PASSED || echo FAILED) ===" -- 2.51.2