consolevalidate

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Headless go-virtio console validate harness: boots tamago/amd64 under QEMU, drives a real virtio-console (virtio-serial-pci + virtconsole) device through the go-virtio/console driver, and performs a full TX→RX round-trip proof against a host-side echo peer.

Topology (run-console.sh wires it):

guest virtio-console  <--virtqueue-->  QEMU virtconsole
                                       chardev=socket (unix)
                                            |
                                       host echo server (Python)

The guest WRITES a known multi-byte token to the console transmitq; QEMU hands it to the host chardev socket; the host echo server reads it and writes the exact same bytes back; QEMU lands them on the guest receiveq; the guest READS them and asserts byte-equality itself. It then prints CONSOLE-VALIDATE: PASS / FAIL over the SERIAL console (COM1) — which is a SEPARATE device from the virtio-console under test, so the verdict can't be confused with the token bytes. run-console.sh parses the verdict.

This mirrors the blk/gpu harnesses: a *real* virtio-console-pci device (not the fake transport the unit tests use) is what exercises the two-virtqueue setup (rx=queue0, tx=queue1), the raw header-less byte stream, descriptor publication, used-ring polling, and DMA alignment on actual QEMU emulation.

Like blk, QEMU's virtio-serial-pci defaults transitional (legacy DID 0x1003); run-console.sh passes disable-legacy=on so the device advertises the modern DID 0x1043 that the modern-only driver (pci.Probe for 0x1043) requires.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL