KUnit: Past, Present, and Future
summary
KUnit is an in-kernel unit test framework merged in Linux 5.5 that runs small C tests built into the kernel or as modules, and outputs KTAP. It provides resource cleanup, parameterized tests, integration with KASAN, and a KUnit.py tool that builds UML kernels and parses results. Module support and an executor fix counting and runtime issues; many subsystems (crypto, ext4, KASAN/KCSAN) add tests and CI integration is underway.
AI-written summary · about
chapters (20)
- 0:00Intro
- 1:48What is KUnit?
- 6:51How are tests structured?
- 8:11Example: list_test
- 9:36Example: suites
- 10:25Running tests (with kunit_tool)
- 12:29Results (TAP format)
- 13:54Results (kunit_tool)
- 15:02Other neat tricks
- 18:59Module Support
- 21:10Named resources
- 22:31Improved TAP output / executor
- 23:30KASAN integration
- 26:17Parameterised Testing
- 29:28Continuous Integration
- 33:55Tooling updates
- 37:03New tests
- 38:16Mocking and Hardware Testing
- 41:05Skippable test support
- 41:43Bugfixes and tooling improvements
related talks
45m"KUnit: Past, Present, and Future"
44mKUnit - Unit Testing for the Linux Kernel
30mKernel Testing with KUnit: Bridging the Gap
28mTesting Drivers with KUnit (Does hardware have to be hard?)
16mHow do we make KUnit work for us?
24mKUnit Testing Insufficiencies
18mKUnit: Function Redirection and More
21mUAPI testing with KUnit
