Sep 9 – 11, 2019
Europe/Lisbon timezone

KUnit - Unit Testing for the Linux Kernel

Sep 11, 2019, 10:45 AM
Floriana/room-III (Corinthia Hotel Lisbon)


Corinthia Hotel Lisbon

Kernel Summit talk Kernel Summit Track


Brendan Higgins (Google LLC)


KUnit is a new lightweight unit testing and mocking framework for the Linux kernel. Unlike Autotest and kselftest, KUnit is a true unit testing framework; it does not require installing the kernel on a test machine or in a VM (however, KUnit still allows you to run tests on test machines or in VMs if you want) and does not require tests to be written in userspace running on a host kernel. You can read more about KUnit in this LWN article.

In the first half of the talk we will provide background on what unit testing is, why we think it is important for the Linux kernel, how KUnit provides a viable unit testing library implementation, and offer a brief demonstration of how it might be used.

In the second half of the talk we will talk about the future. We will talk about KUnit's roadmap, the challenges that KUnit is facing, how to structure the Linux kernel testing paradigm, and how KUnit fits into it.

I agree to abide by the anti-harassment policy Yes

Primary author

Brendan Higgins (Google LLC)

Presentation materials