Commit graph

3258 commits

Author SHA1 Message Date
Peter Hutterer
f2cf226f15 gitlab CI: build a release with -Werror
Any compiler warnings in the default build are likely caught by developers
anyway. Let's build one with -Werror and the release buildtype to catch
anything triggered by optimization or somesuch.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-27 21:16:31 +10:00
Peter Hutterer
3a1f3b754e doc: fix typo in pointer acceleration docs
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/69

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-27 21:03:50 +10:00
Peter Hutterer
4f5182c8b0 tools: add record/replay to --help output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-27 15:40:13 +10:00
Peter Hutterer
ea5edf09c4 tools: libinput-record: print the list of quirks
Now that all device quirks are in the quirks subsystem we have to print those
instead of just the udev devices.

Since libinput-record is there to record system devices, the system-installed
quirk list is used (without any commandline overrides right now). This is
useful to capture misconfigurations or missing quirks on the host system.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/58

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 13:59:30 +10:00
Peter Hutterer
07e93f077e tools: move printing device quirks to the shared tools lib
This way we can re-use this from libinput-record instead of having to
duplicate all this. Since the two tools use different printfs, just make the
actual printing a simple callback.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 13:59:30 +10:00
Peter Hutterer
76233364b1 test: parse arguments before any other stuff
If the args are bad, we don't need to check for root and whatnot.

Only exception here is the debugger check because it changes defaults that we
may want to override with commandline arguments later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 13:51:23 +10:00
Peter Hutterer
237ebb7cc4 touchpad: don't disable tapping on MT_TOOL_PALM
The tapping code can handle palm states now, so there is no need to disable
tapping altogether when a tool-based palm is detected.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/65

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 01:37:28 +00:00
Peter Hutterer
b049d6696d tools: fake-build the measure touch-pressure/size sources
This way we can make them execute the list-quirks from the builddir. And it
makes it easier to run these tools from the git directory on machines where we
have libinput without the quirks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 01:30:25 +00:00
Peter Hutterer
5ca1862bde test: add a libinput-test runner for 'deviceless' tests
These are tests that don't need *any* uinput devices at all. Mark them
accordingly and create a new binary that only runs those tests. This way we
can run some of the test suite even in containers where we're restricted.

Better have 10% tested than none, I guess.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-26 11:18:31 +10:00
Peter Hutterer
07a0d04fd3 test: switch the global device list to a struct list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:14:48 +10:00
Peter Hutterer
2510d5550d test: fix indentation in litest-int.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:08:37 +10:00
Peter Hutterer
d96494e5a7 test: quirks: init value to avoid valgrind errors
value isn't touched where the quirk doesn't exist, so we're accessing an
uninitialized variable here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:08:37 +10:00
Peter Hutterer
3f72d6df2e test: if we never installed any udev files, we don't need to reload
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:08:37 +10:00
Peter Hutterer
9d26caa569 test: init test quirks in /tmp, not /run
We don't need to be root to write to tmp

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:08:37 +10:00
Peter Hutterer
55d2890aae quirks: free the dt string
Not sure how that got through the valgind test before...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-25 11:08:37 +10:00
Peter Hutterer
b6e2038aaf gitlab CI: add Arch to the list of built images
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-22 16:07:09 +10:00
Peter Hutterer
8fa778e3d0 gitlab CI: add pkgconfig to the list
It's pulled in by some dependency anyway, but for the sake of being explicit,
pull it in.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-22 15:10:02 +10:00
Peter Hutterer
5354226e59 util: use assert() instead of abort() for testing for size limits
This way we can send a message to the user, a simple abort() isn't informative
enough.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/54

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-22 09:37:20 +10:00
Peter Hutterer
304441df3e test: don't require a device for quirks parsing tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-22 09:34:44 +10:00
Konstantin Kharlamov
061e504261 libinput-private: constify inline helpers
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2018-06-21 23:26:41 +00:00
Peter Hutterer
58b47f122d gitlab CI: run ninja test too
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/62

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:46:07 +10:00
Peter Hutterer
0a9c28c8c0 test: skip the test-suite runner based on SKIP_LIBINPUT_TEST_SUITE_RUNNER
The current /dev/input/* check isn't reliable enough. So rather than adding
extra heuristics prone to fail add an environment variable that says "do not
run the test suite runner". All other tests are run since they do not
require/modify any specific system setup.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/62

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:46:04 +10:00
Peter Hutterer
c20d50eb6f tools: libinput-replay: set INPUT_PROP_* properties on the device
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/60

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:02:20 +10:00
Peter Hutterer
18e397446f doc: update docs to use a .yml suffix for libinput recorded files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:02:20 +10:00
Peter Hutterer
8684900464 tools: libinput-record: use .yml suffix in the man page
Makes things easier when users save it as yml file

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:02:20 +10:00
Peter Hutterer
ee0f44d438 test: fix zalloc max size tests
Missing from 9873d68bf1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 15:02:20 +10:00
Peter Hutterer
c54d81b9ec tools: touch-size: update to use the device quirks
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/57

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 11:48:41 +10:00
Peter Hutterer
404990f125 tools: touchpad-pressure: update man page for device quirks
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/48

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 11:41:25 +10:00
Peter Hutterer
84ef08dd7f Merge branch 'wip/measure-thumb-pressure' 2018-06-21 11:34:11 +10:00
Peter Hutterer
015d6f1535 doc: use @verbatim, not @code for shell commands
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 11:13:57 +10:00
Peter Hutterer
08dbfb94b5 doc: update docs to drop hwdb references
In favour of the device quirks system.

Fixes #55

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-21 11:13:30 +10:00
Sergiusz Michalik
9873d68bf1 zalloc limit fix for libinput-record 2018-06-20 19:34:28 +02:00
Peter Hutterer
3b41be9419 tools: touchpad-pressure: add thumb pressure handling
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/49

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 14:01:17 +10:00
Peter Hutterer
ecc406ee53 tools: touchpad-pressure: switch to using quirks for pre-loading thresholds
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/48

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 14:01:17 +10:00
Peter Hutterer
efe954aea8 tools: list-quirks: make the output easier to parse
Print the "has no quirks" to stderr to keep stdout tidy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 14:01:17 +10:00
Peter Hutterer
39cc6d054a tools: list-quirks: print the value of the quirk too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 14:01:17 +10:00
Peter Hutterer
ca76511411 data: lenovo: fix device name for the X1 Carbon 6th
Possibly a typo, who knows.

https://gitlab.freedesktop.org/libinput/libinput/issues/46

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 13:07:38 +10:00
Peter Hutterer
91e6a84f2c tools: list-quirks: add the thumb pressure threshold property
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:59:20 +10:00
Peter Hutterer
201c876ab4 tools: list-quirks: fix usage to read "libinput list-quirks"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:59:20 +10:00
Peter Hutterer
e855605616 tools: list-quirks: compress a condition
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:59:20 +10:00
Peter Hutterer
c9cc785612 quirks: drop the JUMPING_SEMI_MT model
Removed from the udev properties in a55693f87c
but survived here while the branch was in process.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:59:20 +10:00
Peter Hutterer
307f4a5636 meson.build: add more overrides for coverity
"/usr/include/math.h", line 381: error #20: identifier "_Float32" is undefined
  # define _Mdouble_		_Float32

Same for a few others. Since we don't actually need those anyway, we can just
cast those to the some close-enough sizes. We don't have stdint.h in config.h
and meson cannot have a custom #include line in the config object. So let's go
with what does the job for now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matheus Santana <embs@cin.ufpe.br>
2018-06-20 11:41:48 +10:00
Peter Hutterer
793c8d51e8 util: abort if we try to allocate more than a MB
The ssize_t cast upsets coverity for some reason but we can be a lot more
restrictive here anyway. Quick analysis of the zalloc calls in the test suite
show the largest allocation is 9204 bytes.

Let's put a cap on for one MB, anything above that is likely some memory
corruption and should be caught early.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matheus Santana <embs@cin.ufpe.br>
2018-06-20 11:41:48 +10:00
Peter Hutterer
4203ab52bf meson.build: add a libinput list-devices run to the test suite
This will only catch a segfault or some other bug since we don't actually look
at the output. But that's still better than not running it at all.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:26:57 +10:00
Peter Hutterer
1605f71a0b tools: list-devices: unref the udev device
Fixes a memory leak that prevents us from running list-devices in valgrind.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:26:57 +10:00
Peter Hutterer
7c51c881dc tools: pass a valid grab parameter to list-devices
My kingdome for a compiler warning. Or a scan-build warning. Or a coverity
warning. Or anything... But no, nothing.

Also make the open_restricted() more robust to a NULL userdata, because
effectively that's what we were passing here.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/50

Introduced in 0a13223c39

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-20 11:26:57 +10:00
Benjamin Tissoires
e70e67847c CI: WIP: attempt to clean up the registry before leaving
According to multiple sources, referenced in
https://engineering.facile.it/blog/eng/continuous-deployment-from-gitlab-ci-to-k8s-using-docker-in-docker/

The garbage collector of the registry won't clean up docker images that
still have blob references. We should clean up the manifests instead
of simply overwriting the tag.

Note: this requires to set up a personal token with api access from the
maintainers in the form of (for instance): "PERSONAL_TOKEN_bentiss"

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-06-19 10:41:48 +02:00
Benjamin Tissoires
b2b7fab7b1 CI: speed up the docker_check stage
There is no point in login in to the registry if there is no need to
create a new docker image.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-06-19 10:41:43 +02:00
Benjamin Tissoires
ca60c67bc1 CI: do not pull images when checking for the creation date
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-06-19 10:41:16 +02:00
Peter Hutterer
30b9c929a6 doc: point to the gitlab ci file for a list of required packages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-19 13:40:07 +10:00