~/talk

Testing Drivers with KUnit (Does hardware have to be hard?)

slides:none on file

KUnit is the in-kernel unit test framework (since Linux 5.5) and now hosts almost 1,000 upstream tests. The talk lays out concrete tooling: static stubbing / function redirection, resource helpers (kunit_resource, defer actions), and proposals for device fakes via kunit_device versus root_device or platform_device. Hardware mocking options include UML’s LOGIC_IOMEM, variable redirection, and QEMU backchannels. Limits noted: global hardware state, weak multi-thread support, tricky user memory contexts, and gcov works reliably with Clang for coverage.

AI-written summary · about

  1. 0:00Introduction to KUnit
  2. 1:03What is KUnit?
  3. 2:05Easy vs hard to test code
  4. 5:39Why drivers are hard to test
  5. 8:10Challenges with global state
  6. 11:19Refactoring for testability
  7. 14:09Function redirection in tests
  8. 16:41Testing device drivers
  9. 19:09Future solutions for hardware testing
  10. 22:44Emulating hardware in QEMU
  11. 24:57KUnit growth and adoption
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.