Documentation
¶
Overview ¶
Headless go-virtio fs validate harness: boots tamago/amd64 under QEMU, drives a real virtio-fs (vhost-user-fs-pci) device through the go-virtio/fs driver against an out-of-process virtiofsd daemon, and performs a real FUSE round-trip:
- OpenVirtioFS -> Init (FUSE_INIT handshake with virtiofsd)
- Lookup(FUSE_ROOT, "hello.txt") -> Open -> Read, asserting the bytes read back equal a known string the host placed in the shared dir.
- Create(FUSE_ROOT, "guest-wrote.txt") + Write of a known token, so the host can confirm the guest's write reached the real shared directory.
It prints FS-VALIDATE: ... PASS/FAIL plus the read-back bytes and the write token over the serial console. The host (run-fs.sh / the validate driver) parses the verdict and then independently checks that the guest-written file appeared in the shared dir with the expected token.
This mirrors cmd/blkvalidate: a *real* virtio device (not the fake transport the unit tests use) exercises the descriptor-chain build, the device-written reply, virtio_fs_config tag read, and DMA alignment on actual QEMU emulation — here additionally crossing the vhost-user + shared-memory boundary into virtiofsd, which only Linux hosts can run.