Improve QEMU execution

Draft
HE
25d ago
+234-34

Improve error reporting from qemu execution, in preparation for conformance test failed runs.


Summary by cubic

Improves qemu-runner.sh lifecycle handling and diagnostics so a VM can be started and stopped from different shells without risking cleanup of a recycled PID. It also centralizes the test VM's SSH options and adds no-VM regression coverage.

  • start --state-file PATH records the port, key, and pidfile; stop --state-file PATH validates process identity before signaling and preserves state if SIGKILL fails.
  • Failed boots and guest /tmp setup now report the serial console and QEMU output before cleanup.
  • Both QEMU lanes share one SSH option list (their keep-alive settings had drifted), and IdentitiesOnly=yes limits offers to the VM key so agent-held keys can't trip the guest dropbear's 15-query cap.
  • Sourcing the script no longer replaces the caller's EXIT trap, and test-qemu-runner.sh covers start/stop with stand-ins in the check lane.

Migration

  • Pass --state-file PATH to both start and stop for cross-shell use; without it, stop cannot find the VM.