Closed benzea closed 3 years ago
OK, I added a test. I just recorded plugging in a keyboard and hit some keys. Then did the minimal ioctls to grab two packets.
Not ideal, but should exercise a large chunk of the relevant code, even if many corner cases re not covered.
Hmm, sec, I am getting errors from libusb. I think I need to change an error code somewhere.
OK, good now. I was returning ENOENT rather than EAGAIN if there was no reapable URB.
The ioctl-tree based replay is mostly useful for protocols that are fundamentally state-less. With state-full protocols, the ioctl-tree may randomly jump around, cause confusing situations and gets the order wrong during recording.
The pcap based replay is also able to play-back control transfers adding this feature to umockdev, even if outside of the original ioctl-tree implementation.
Note that umockdev does not support creating a recording. Recordings should be done using a separate tool such as wireshark.
Closes: #82, #117