~/talk

Fake Drivers: A Practical Guide To Zephyr Test Doubles

slides:none on file

Explains how Zephyr test doubles are implemented as fake device drivers that satisfy driver API dependencies without changing the DUT, using the single‑header Fake Function Framework (FFF, MIT, ~6000 LOC) to generate spies, stubs and delegates; shows concrete fake drivers (CAN introduced 2022, LEDs, EEPROM, PWM, regulator, RCC, stepper), details driver anatomy (device tree binding, Kconfig, CMake, impl, public header), and lists pitfalls: must define FFF globals once, reset fakes between test cases, and install custom delegates for output parameters to avoid uninitialized memory; some fakes are verified fakes that pass API tests.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Problem with dependencies
  3. 4:18Test double terminology
  4. 6:48Fake Function Framework
  5. 11:52Fake functions with FFF
  6. 15:25Fake drivers explained
  7. 19:39Anatomy of fake driver
  8. 27:07Using fake drivers in tests
  9. 29:17Common pitfalls
  10. 34:16Existing fake drivers
  11. 35:21Resources and summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.