From 6716359fe8b2bca84713f60a33b565c614db5396 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 7 Jan 2020 13:45:33 +0100 Subject: [PATCH] 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. --- tests/README-umockdev | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/README-umockdev b/tests/README-umockdev index cabbace1..eec3598c 100644 --- a/tests/README-umockdev +++ b/tests/README-umockdev @@ -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 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 -an image with the device. \ No newline at end of file +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. \ No newline at end of file