From 363e24bcd18a28948f63fa78ac8a4eaa8784fe59 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 16:33:09 +0100 Subject: scripts: add test-usb; fix duplicate -bios in the test harness - test-usb boots an EHCI and an xHCI controller with a mouse + keyboard and asserts enumeration, report decoding, and input reaching the shell. The EHCI case asserts one key end-to-end (QEMU's EHCI model delivers only the first report through root-port split transactions); the xHCI case asserts a whole typed command. - lib.sh: qemu_args() already supplies -bios, so the fresh OVMF varstore copy was silently overridden by the system firmware. Pass the copy last (QEMU honours the last -bios) so tests really boot clean NVRAM. - DEBUG_NOTES: document why USB never worked on the OptiPlex (EHCI shipped with DEBUG_MATRIX enabled, no RMH/hub support, only the first controller, no boot protocol, unbounded DMA), the success/failure log to look for on hardware, and the QEMU coverage limits. - Makefile: add test-usb and include it in `make test`. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ee9755f..ead8c20 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SYSTEM_IMG ?= /tmp/system.img .PHONY: all build run run-headless debug system system-fresh inspect \ - test test-disk test-fault test-gfx test-mouse test-msg fmt clean help + test test-disk test-fault test-gfx test-mouse test-msg test-usb fmt clean help # ---- build ---------------------------------------------------------------- @@ -45,7 +45,7 @@ inspect: # ---- tests ---------------------------------------------------------------- -test: test-disk test-gfx test-mouse test-msg test-fault +test: test-disk test-gfx test-mouse test-msg test-fault test-usb test-disk: ./scripts/tests/test-disk.sh @@ -62,6 +62,9 @@ test-mouse: test-msg: ./scripts/tests/test-msg.sh +test-usb: + ./scripts/tests/test-usb.sh + # ---- utilities ------------------------------------------------------------ fmt: @@ -86,6 +89,7 @@ help: @echo " make test-mouse PS/2 mouse + cursor tracking" @echo " make test-msg scheduler message queues" @echo " make test-fault fault dump (screen + serial)" + @echo " make test-usb USB HID enumeration (EHCI + xHCI)" @echo " make fmt format Rust source" @echo " make clean remove build artifacts" @echo "" -- cgit v1.2.3