Unit tests for QEMU's virtual device currently are built upon the glib test framework. In order to ease the implementation of tests, QEMU provides the qtest protocol as well as a library of helper modules, libqos. libqos provides helper code for common device kinds (USB, PCI or virtio), but test needs to know how to start QEMU (machine type and parameters).
This talk will present an extension to libqos that wraps the glib test framework and augments it with knowledge of QEMU machine types and devices. Based on a description of the machines and devices, and on generic code to access the device, libqos generates all possible combinations of machines and architectures, and takes care of creating a "device object" for use in the tests.
This work was sponsored by Google, as part of GSoC, with mentoring from Laurent Vivier and Paolo Bonzini of Red Hat.
Laurent is contributing to QEMU and KVM since 2007, after a détour into the world of HPC, he has joined in 2015 the Red Hat Virtualization team, focusing his efforts on KVM for POWER.