2 ms·
> or they could be, by writing a mock for the device in question That would create a good description of the hardware that could be used for emulators and to t
by rbanffy 4y ago
> or they could be, by writing a mock for the device in question
That would create a good description of the hardware that could be used for emulators and to test whether actual hardware behaves the way it was specified to behave.
> the vast majority of ugly bugs in drivers usually originate from differences between that spec and the behavior of the device in the real world.
Having the model hardware encoded in software would make it possible to test its behavior against real hardware for comparison and allow making adjustments.
- ilyt 4y agoThat takes massive amount of effort (most likely writing the emulator is way more than the actual driver code) and still only allows you to say "given those assumptions, that might be not correct, the code works". > Having the model hardware encoded in software would make it possible to test its behavior against real hardware for comparison and allow making adjustments. So you waste weeks to set up a hardware test jig, trying to match it with software and next firmware update changes some stuff that makes model incorrect again. I mean I would expect that if you're a company that wants to put a driver for your hardware into kernel, but many drivers are just RE stuff and setting up a test jig for hardware that allows for fully automated testing can be quite an effort