~/talk

Unit Testing Memory Mapped Device Drivers

Talkat Embedded Open Source Summit 2024 · 2024-04-16..04-18· [testing]
linkedin:jbettis
slides:none on file

Presents a concrete pattern to unit test memory-mapped drivers by replacing direct dereferences with a hookable EC_REGGE macro that redirects reads/writes to fake registers, building tests with Native Sim on POSIX and a DTS overlay, using the virtual interrupt controller and work queues for kernel behavior. Implements level-trigger emulation, reaches 100% unit test coverage before changing code, and the feature works on real hardware on first try.

AI-written summary · about

  1. 0:00Unit testing device drivers
  2. 2:13Why unit testing matters
  3. 4:00IT GPIO driver case study
  4. 10:08Register access interception
  5. 13:48Register side effects and limits
  6. 16:57Pure unit testing limits
  7. 19:25New level interrupt testing
  8. 21:38Success with test-first development
  9. 22:00Q&A
~/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.