Unit testing device drivers

In the old days, that was how we tested and debugged device drivers. The very best way to debug such a system was for engineers to use the embedded system as a development system and—once adequate system maturity was reached— take away the original cross-development system!

For your situation, several approaches come to mind:

  • Add ioctl handlers: each code exercises a particular unit test
  • With conditional compilation, add a main() to the driver which conducts functional unit tests in the driver and outputs results to stdout.
  • For initial ease in debugging, maybe this could be made multi-platform operable so you don’t have to debug on the target hardware.
  • Perhaps conditional code can also emulate a loopback-style device.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)