~/talk

Unit Testing Memory Mapped Device Drivers

linkedin:jbettis
slides:none on file

Describes a concrete method that replaces direct register dereferences with a hook so tests can redirect accesses to fake variables, uses EC_REGGE macro redefinition and native_sim as the test board, builds glue headers to compile Posix, and simulates edge/level behavior and a register-clear-on-read quirk. Claims and demonstrates 100% unit test coverage before and after adding level-interrupt emulation, and verifies the feature works on real hardware on first try.

AI-written summary · about

  1. 0:00Unit testing device drivers
  2. 2:33Why unit testing is hard
  3. 3:59Case study: IT GPIO driver
  4. 5:03Intercepting register access with EC_REG
  5. 6:27Choosing Native Sim
  6. 8:11Build and header dependencies
  7. 10:24Redirecting to fake registers
  8. 11:49Verifying fake registers
  9. 13:35Testing GPIO functions
  10. 14:00Handling side effects
  11. 15:48Limitations and improvements
  12. 17:14Native Sim vs hardware
  13. 19:25Unit test driven development
  14. 21:57Q&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.