Commit graph

4045 commits

Author SHA1 Message Date
Peter Hutterer
142399f8a3 gitlab CI: move the build instructions into a bash file
Extending/debugging scripts in the gitlab CI directly is a pain, the
turnaround cycle is terrible. Let's move this into a shellscript that we can
just call directly.

Bonus side-effect: if we wanted to extend the script: set somewhere, this is
now much easier to override.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 14:35:55 +01:00
Peter Hutterer
3f051ca9d8 gitlab CI: add meson to junit script
This script was written by Emmanuele Bassi, copied from
https://gist.github.com/ebassi/e5296ec77ae9e0d3a33fd483b5613b09/

It converts meson test results into a junit file which we can then use to
display in the merge request GUI.

Note that as litest writes out junit files as well, some tests are reported
twice. Specifically: where litest fails the failure will be reported once
through litest itself and once by meson test. Oh well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:52:54 +01:00
Peter Hutterer
3ac525db19 test: write our test case results out as junit xml files
libcheck has the ability to write out XML files for test results, but
converting those into junit isn't ideal, for a number of reasons:
- junit xml is different to libcheck's xml, so not all data is available or
  useful. Especially with our litest wrappers around it.
- litest forking off tests means we have to wrap around everything anyway to
  avoid multiple forks writing to the same test file.

This is the minimal implementation since it's only user is likely the CI which
we control fairly tightly. So there are a few corners we can skip:
- no filename validation is performed by litest
- we write out a lot of junit xml files (one per litest fork). Rather than
  collating those we just rely on the CI to find the files.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:52:54 +01:00
Peter Hutterer
773b322e8b gitlab CI: apply some basic validity checks on the commit messages
Let's stop merge requests from users that don't set their git author name and
email address. Aside from it looking stange in the history it'll also make it
virtually impossible to ever find that user again should something important
arise in the future - especially if we switch off gitlab.

The rest is basic style, short subject lines, Signed-off-by lines and correct
formatting.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
[bentiss: use /usr/bin/env python3 as requested by the CI]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-11-28 11:43:26 +01:00
Peter Hutterer
c63c3b2f7b gitlab CI: rename the container_prep state to just "prep"
So we can shove other stuff in there without it looking strange.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 11:15:27 +01:00
Peter Hutterer
6824125412 gitlab CI: use multiple extends for the default artifact/build snippets
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
caa3ea7801 gitlab CI: use multiple extends over anchors for the upstream pull
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
a3a1f4f3d9 gitlab CI: add a global policy snippet for retries and interruptible
We want to retry if we have a system/timeout/stuck failure. And our jobs are
all interruptible, we want to cancel them when the branch has new commits.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
25105d0434 gitlab CI: split all extends into multiple lines
No functional changes, this merely prepares the file for easier multiple
extends.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-28 05:00:26 +00:00
Peter Hutterer
47767290a7 tools: print the libinput version in debug-events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 15:16:30 +10:00
Peter Hutterer
eb16ce2520 tools: libinput-record: drop the explicit --multiple argument
If we want to record multiple events, let's just specify multiple event nodes.
No need for a specific extra argument here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
5a275ef171 tools: libinput-record: return the correct exit value on invalid usage
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
1457ac8446 tools: libinput-record: bail out on invalid commandline arguments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
03bc7121eb tools: print stderr/stdout when a option test fails
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-27 10:34:18 +10:00
Peter Hutterer
5dc1a7ebd3 Adjust for 64bit time_t for 32bit architectures
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-26 15:11:44 +10:00
satrmb
29785df999 touchpad: simplify tapping state machine by eliminating the multitap states
Alternating between TAPPED and DRAGGING_OR_MULTITAP on repeated taps is enough, no need for more states.
2019-11-26 02:34:44 +00:00
satrmb
bba79754d6 test: fix a multitap test expecting one tap too few
The problem was masked by a missing timeout, causing one up / down pair to not yet be enqueued before reading the queue.
2019-11-26 02:34:44 +00:00
Peter Hutterer
490131ff61 tools: make debug-events accept multiple device nodes
For interaction between devices it's necessary to look at more than one device
at a time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-26 00:34:08 +00:00
Peter Hutterer
765f7917bb tools: replay: fix wrong timestamps for multiple device replay
When multiple devices are recorded, the event times are offset from a global
baseline. Each device thus has a different offset for the first event. To
replay correctly, we must figure out the offset of the first event (across all
devices) and use that for all of them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-25 23:06:09 +00:00
Rasmus Thomsen
8b492eaaa5 Add Palm&ThumbPressureThreshold for the Spectre x360 15-ch0xx
Without this palm rejection doesn't work properly, making typing pretty
annoying.
2019-11-25 02:02:55 +00:00
Peter Hutterer
61ce80c5b1 completion: add the new libinput debug-tablet to the zsh completion files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 14:48:54 +10:00
Peter Hutterer
f87a6203ee tools: print the tip state in the tablet debugging tool 2019-11-19 09:56:14 +10:00
Peter Hutterer
c9e9ea3840 tools: add stylus button support
For the evdev events only a few hand-selected ones, all other ones are ignored
for now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 09:56:14 +10:00
Peter Hutterer
733eb07eda tools: add a tablet debugging tool
Nothing sophisticated but easier to debug certain tablet oddities.
It shows a bar for each axis on the tablet (and the evdev axis) and prints
that relative to the axis range. This makes it easy to check if we do hit the
full range (especially for distance/pressure/tilt) and whether that matches
with what the device gives us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-19 09:56:14 +10:00
Peter Hutterer
2c613feb0c tools: debug-events: expand timestamp prints to full millis
Tens of millis is not quite enough in some cases.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 22:43:48 +00:00
Peter Hutterer
558cc3f11c tools: debug-events: offset timestamps by the first normal event
Start counting the timestamps from the first time we get something off the
actual fd. This makes it easier to match up timestamps with the output from
libinput record.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 22:43:48 +00:00
Peter Hutterer
eef00ff3c6 tools: libinput-record: expand the evdev event value to 7 digits
MSC_TIMESTAMPS need 7 digits so let's make sure everything is nicely aligned

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-18 05:34:56 +00:00
Peter Hutterer
db546c368c doc: remove the direct link to the various state diagrams
draw.io is playing up with old files and sending me into a redirect loop.
Duplicating files works but that changes the links. So to avoid dead links,
let's just remove the direct link and let anyone who cares enough about it ask
me.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
a524cf9761 test: allow for substring matching in the various --filter- arguments
A unique substring of a test/group/device should be enough to filter, even
without surrounding it with asterisks.

This allows for things like --filter-device=t440 as opposed to the previous
--filter-device="*t440*".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
2c4105ae51 doc: updates to the tap state machine
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
271616265b touchpad: don't allow for multifinger tapping after a move
In the current implementation, movements > threshold and timeouts usually move
to HOLD state and continue from there. Where a finger is lifted, we go back
up the diagram into the previous finger count's HOLD state.

The side-effect of this is that a tap of a finger can be counted as tap even
after a movement:

- two fingers down, move to scroll, hold down
- third finger down, third finger up

This sequence triggers an erroneous three-finger tap. Once the motion
threshold is hit by any touch, no finger must trigger 2/3 finger tap events
while any touch is down.

The false tap is only triggered where the new finger can execute a tap without
any other finger changing any property. This can be triggered on the
reporter's Dell Precision 5520 but on most other touchpads, a new finger down
will trigger slight movement, pressure or touch size updates and thus the bug
cannot be triggered.

Fixes #382

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Peter Hutterer
c5f5a0fa7b test: fix a pressure test to movement during tap
The motion event here was intended to offset the light pressure from the
extended touch down. This also causes motion past the tap threshold and won't
work with a future patch.

Make the touch "real" by simply plaing a normal movement in the current
position - the kernel will filter and we'll just update the pressure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-15 00:24:00 +00:00
Philipp Fischbeck
6f4ca7cd50 Fix typo in zsh completion 2019-11-14 20:28:00 +00:00
Peter Hutterer
3205c29c60 meson.build: drop the explicit -g flag
Let's rely on meson to set this for us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-06 11:48:49 +10:00
Peter Hutterer
eab156ef74 gitlab CI: work around collapsed multiline commands in the rebuild check
Multiline commands are currently collapsed with no way of uncollapsing them
(https://gitlab.com/gitlab-org/gitlab-runner/issues/3392), so we never see the
skopeo invocations. Work around this by touching a file when scheduled and
using that to break up the conditions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-05 11:00:16 +10:00
Peter Hutterer
b9bfaebba2 gitlab CI: allow the qemu-prep job to fail, runners are unreliable
The qemu jobs themselves already have this tag so let's add it to the
container prep itself too. Unfortunately the CI doesn't have a conditional
allow-failure (ideally we want retry's stuck_or_timeout_failure condition).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-05 11:00:16 +10:00
Peter Hutterer
bdd798778a test: remove the hardcoded four-job valgrind test run
Make this dependent on the number of processes too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-05 00:54:32 +00:00
Peter Hutterer
c6905dcd0b test: drop a now-obsolete test
As of d20bbfa5cb we handle the direct tool switch correctly so there's
no more warning. Which means testing for the warning is pointless.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-05 00:12:08 +00:00
Peter Hutterer
53200be4ae gitlab CI: add diffutils to the Fedora RPMs
Needed for the symbols leak test.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-04 23:32:34 +00:00
Peter Hutterer
d20bbfa5cb tablet: handle a direct tool switch correctly
Fixes #259

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 23:27:39 +00:00
Peter Hutterer
bc461b0292 tablet: add a helper function to get the current tool
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 23:27:39 +00:00
Peter Hutterer
12021c860e tools: debug-gui: show pressure/distance as vertical bar
Both of these are normalized so let's draw a bar that shows the values
accordingly. This makes it a lot easier to check whether pressure values go to
the maximum, etc.

A little extra square is shown whenever the tip is logically down.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 08:38:59 +10:00
Peter Hutterer
7bd96ec923 gitlab CI: split the qemu test runs up into multiple jobs
The tests are split by topic but have varying runtime. Specifically, the
longest test (touchpad) takes ~170s whereas many of the others can take less
than a second. Splitting them all up into separate VMs costs too much in
startup time so here's the middle ground of some custom grouping to make the
tests roughly run the same time.

This list will need to be manually maintained but given that groups are rarely
added anyway this shouldn't be too much of a maintenance burden. And bonus:
since the kvm tests often fail due to timing issues, re-running one is
significantly faster now.

This shaves about 8min of the CI run

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 15:53:36 +10:00
Peter Hutterer
b6343d0a3f gitlab CI: fix an indentation issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-31 10:40:40 +10:00
Peter Hutterer
2f22580deb test: remove a useless assignment
copy/paste error that makes coverity unhappy. This is the code to correctly
release all touches and the buttons have already been processed above - no
need to reassign here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:43:18 +10:00
Peter Hutterer
3819b21967 test: silence a coverity warning
Coverity complains that we call libinput_event_destroy() twice on the variable
(once in and once just outside the condition). This is technically correct but
never true because we always break the loop early for the touch up/frame events.
Let's just reset the pointers so coverity is happy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:38:59 +10:00
Peter Hutterer
cfa06b6098 test: remove some useless code triggering a coverity warning
x/y assigned but never used. Dropping those few lines gets rid of the warning
and checks the coordinates correctly now too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-30 10:29:46 +10:00
Peter Hutterer
883e0a1eea tools: drop the specific libinput measure tools from the libinput man page
libinput measure lists them all anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 11:08:19 +10:00
Peter Hutterer
31dd2ba2f1 tools: correct libinput measure reference to the tap man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 11:08:19 +10:00
Peter Hutterer
454dd4a2cb test: make the test jobs dependent on the number of processors
Let's hope the test suite is more successful on puny VMs that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-10-29 08:01:00 +10:00