tests: Add more notes about umockdev recording creation

umockdev recordings are usually not usable as is. Add some notes to the
README to summarise what kind of changes may be required.
This commit is contained in:
Benjamin Berg 2020-01-07 13:45:33 +01:00
parent c27a4faeca
commit 6716359fe8

View file

@ -21,4 +21,33 @@ To create a new umockdev test, you should:
Please note, there is no need to use a real finger print in this case. If Please note, there is no need to use a real finger print in this case. If
you would like to avoid submitting your own fingerprint then please just you would like to avoid submitting your own fingerprint then please just
use e.g. the side of your finger, arm, or anything else that will produce use e.g. the side of your finger, arm, or anything else that will produce
an image with the device. an image with the device.
Note that umockdev-record groups URBs aggressively. In most cases, manual
intervention is unfortunately required. In most cases, drivers do a chain
of commands like e.g. A then B each with a different reply. Umockdev will
create a file like:
A
reply 1
reply 2
B
reply 1
reply 2
which then needs to be re-ordered to be:
A
reply 1
B
reply 1
A
reply 2
B
reply 2
Other changes may be needed to get everything working. For example the elan
driver relies on a timeout that is not reported correctly. In this case the
driver works around it by interpreting the protocol error differently in
the virtual environment.