Advanced NixOS Integration Test Scenarios: USB Passthrough, Xen, and FDO
NixOS integration tests are an enormously helpful tool to automate test scenarios involving one or multiple VMs. The test driver's capabilities allow for complex tests cases beyond testing whether a service comes up correctly or whether a distributed software communicates correctly across multiple peers. In this talk, I present three such advanced scenarios that I encountered during my professional and academic work.
usbvfiod is a USB-controller emulation that enables the passthrough of USB devices to cloud-hypervisor VMs. NixOS integration tests utilize QEMU's capability to emulate USB devices and nested virtualization to automatically test the passthrough of USB sticks and keyboards.
xenmux is a project to allow reseachers to easily configure current and older Xen versions. Tests ensure that every supported version of Xen successfully boots. These tests are not as trivial as they sound, special configuration is necessary to switch from the default direct kernel boot to image-based booting.
FIDO Device Onboarding (FDO) provides a protocol to realize zero-touch deployment of IoT devices without deployment-specific provisioning at the manufacturer. fdo-nix experiments with packaging FDO applications, provides a module for device and server configuration, and checks everything in an integration test, which is non-trivial because has to boot multiple times.
Lukas Beierlieb is a software engineer at Cyberus Technology and a PhD student at the University of Würzburg, both with a focus on virtualization technology. He does not want to imagine a world in that development systems and environments are not managed with Nix.