Re:A list of developer questions to ask prospective employers
by gjulianm on Friday August 19, 2022 @11:33AM
(#32522268)
> identify the salient behavior that is hardware-specific and needs to remain invariant under refactoring, and write unit tests for just that?
I don't think you really can. There will be things that can be different between runs (e.g., a DMA transfer) and not necessarily mean bugs. I don't think there are many fully stateless drivers where that kind of effort would both cover a significant part of hardware behavior and yield good enough code coverage.
Re:A list of developer questions to ask prospective employers
by nyanpasu64 on Friday August 19, 2022 @01:30PM
(#32523848)
Can you record the register writes, DMA transfers of a successful run, then run the kernel in an emulated environment and ensure it makes the same writes, and presents the same results to userspace given the same data returned back? This is probably a lot more practical for a mouse than a high-bandwidth webcam or display where the "expected" logs can run into the megabytes or gigabytes for a few seconds of recording.
I realize that's not perfect -- not even close -- and I'm sure smarter people than me have considered that idea and rejected it. But, out of curiosity, I wonder if you know the reason why it wouldn't help at least add some marginal value?