compare_evemu: ignore keyrepeat events

Key repeat events are generated through a timer within the input stack.
There are much chances that they will not match from one kernel to the
other. As key repeats can still be computed from the current state of the
buttons, let's drop it from the comparison.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite: add -t option for timestamps warnings

Timestamps are not very useful for everyday tests. It's not very reliable
because it depends of the work load of the computer and how many threads
are launched (option -jN).
We can remove by default the check on the timestamps and add an option
for those who really care.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite: better helper message

This has been to nothing for too long.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
evemu_compare: move dump_diff() to evemu_compare

This allows to run evemu_compare out of the tests suite and to dump the
diff-able processed files.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
compare_evemu: add human readable translations for diff dumps

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
compare_evemu: handle comments within the evemu files

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite.py: add a mark .skip to skip known not working devices

In case we found a .skip matching file, and in case there is no known
expected output, that means that we do not have to test the device because
it will break the current system (kernel oops) or because it is not
working with the current kernel

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite.py: implement "fast mode"

The fast mode can be used to reduce the amount of tests when running
several times the tests with the same kernel release.
If there is an expected event file with the same kernel major/minor
than the one we are currently running, this means that this event file
has been created with the same kernel, meaning we can skip it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite.py: better parsing of kernel release

previous one considered "3.10" < "3.9"

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
testsuite: adapt for evemu 1.1 file format

In evemu 1.1 file format, the description is put on top of the
evemu-record command. Thus, the output of evemu-describe is not required
anymore.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
compare_evemu: adapt to evemu 1.1 file format

evemu 1.1 file format allows end of line comments -> handling them.
The format of displaying the value also changed, thus it´s not possible
to compare the strings of the old output to the new one.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
compare_evemu: add EV_SYN events to the output

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
compare_evemu: better handling of key repeats

key repeats generated by the kernel are marked with a value of 2. As the
kernel generate them, there is no guarantee that they will appear in the
same frame at each run.

Also, the kernel generates EV_SYN(1) to send events not triggered by the
device itself. Adding it to all frame to remove entropy during comparisons.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>