Know your QEMU and KVM Test Frameworks
summary
Filesystem paths and commands: compile the KVM self-tests with make in tools/testing/self-tests/kvm and run binaries directly; the framework includes an offloader that lets a host test binary load guest code in the same source file (example: CF4 CPUID sync, dirty lock). Clone and configure the KVM unit tests repo, build and run via run_tests.sh or QEMU -kernel for mini‑kernels (example: xsave.flat). QEMU has unit, qemu-iotests (test 51, 310), QTest (replaces CPU to read/write guest memory), and avocado acceptance tests that download kernels and even use Tesseract OCR for framebuffer checks.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:17KVM selftests
- 5:24Using the kvm-unit-tests
- 9:11QEMU unit tests
- 11:51QEMU iotests
- 14:46QEMU normal run
- 15:01QEMU qtest run
related talks
28mKVM-unit-tests: When "KVM" Doesn't Mean KVM
30mKernel Testing with KUnit: Bridging the Gap
29mQEMU & KVM Automated Performance Benchmarking @ SUSE
41mReducing Friction in Testing Using QEMU and Labgrid for Yocto-based Products
19mChecking your work: Linux kernel testing and CI
28mTesting Drivers with KUnit (Does hardware have to be hard?)
16mHow do we make KUnit work for us?
16mKselftests augmented: running kernelspace tests from userspace
