Peter Hutterer [Wed, 12 Feb 2020 22:28:59 +0000 (08:28 +1000)]
Compress an if statement
No functional changes, just making the code slightly more compressed
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 22:28:32 +0000 (08:28 +1000)]
Localize two variables
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 12:17:13 +0000 (22:17 +1000)]
Uncomplicate the setting of axis during slot sync
A few bytes get wasted, but no magic handling of offsets etc are required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 12:10:59 +0000 (22:10 +1000)]
Push the tracking id change bits on the stack
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 12:09:36 +0000 (22:09 +1000)]
Push the slot_update bits on the stack
Much simpler code this way
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 12:05:33 +0000 (22:05 +1000)]
Drop the mt_sync_state in our device struct
Replace it with a stack-allocated one. This saves us a bunch of confusing
allocations and size calculations.
And in the process use uint32_t/int32_t to ensure the struct is actually the
expected size.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 04:41:32 +0000 (14:41 +1000)]
gitlab CI: align the image tags a bit nicer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 02:20:55 +0000 (12:20 +1000)]
gitlab CI: rename the default_build to autotools_build
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 02:49:27 +0000 (12:49 +1000)]
flake8 fixes for make-event-names.py
Mostly whitespace changes, two semicolon removals and one change to "foo is
None".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 02:46:56 +0000 (12:46 +1000)]
Change the python script to generate event names to Python3
It's well past time. If you need this to run on python2, patch it out locally.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:38:32 +0000 (10:38 +1000)]
test: silence warnings about missing field initializers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:28:24 +0000 (10:28 +1000)]
test: fix two signed vs unsigned warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:20:07 +0000 (10:20 +1000)]
uinput: drop an unused function argument
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:13:52 +0000 (10:13 +1000)]
tools: drop explicit GNU_SOURCE define
It's defined globally through AC_USE_SYSTEM_EXTENSIONS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:13:18 +0000 (10:13 +1000)]
config.h is a local include path
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 00:11:32 +0000 (10:11 +1000)]
tools: drop use of HAVE_CONFIG_H
There's no case where we don't have a config.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Feb 2020 01:43:19 +0000 (11:43 +1000)]
gitlab CI: separate builddir from srcdir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 13 Feb 2020 22:40:16 +0000 (08:40 +1000)]
gitlab CI: use extends over yaml anchors
This also gets rid of some superfluous inclusions - all those are inherited
now anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 13 Feb 2020 22:38:32 +0000 (08:38 +1000)]
gitlab CI: remove a reference to libinput
That's what you get for copy/paste...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 13 Feb 2020 22:20:27 +0000 (08:20 +1000)]
gitlab CI: add a check-commit stage
Taken from libinput, checks for signed-off-by and other things.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2020 22:06:33 +0000 (08:06 +1000)]
configure.ac: add a toggle to enable the special coverity options
Coverity tries to supply system headers and fails badly at it. A bunch of
_Float... sizes are pulled in by math.h but not provided anywhere. So as a
workaround, let's add an option to explicitly enable coverity support that
simply #defines those types to ones we do know about and let's go on hoping
it'll eventually work.
See the equivalent addition to libinput in commit
8178339b5baa717.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2020 03:51:17 +0000 (13:51 +1000)]
Add queue_push_event as shortcut for the two-liner we use everywhere
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2020 03:23:44 +0000 (13:23 +1000)]
Simplify some error handling by assuming a >=3.4 kernel
v3.4 was released in 2012, every kernel since has that ioctl. So instead of
assuming you're running new libevdev on an 8 year old kernel, let's assume
that any error from the ioctl() is an actual error and handle it accordingly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2020 09:46:59 +0000 (19:46 +1000)]
test: slightly modernize some of the tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2020 10:44:25 +0000 (20:44 +1000)]
test: provide a function to print an event
Easy to copy/paste into a test that needs a bit of debugging, otherwise unused.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2020 10:37:01 +0000 (20:37 +1000)]
test: split the tests into one test case each
For debugging it's more important to be able to quickly run a single test
rather than grouping them together, we don't have thousands of tests here
anyway. So let's add a macro to put every test func into its own TCase,
allowing for test selection via the environment variable CK_RUN_CASE.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 10 Feb 2020 09:10:05 +0000 (19:10 +1000)]
test: wrap the event checks into a macro
One-liner to check an event rather than three separate statements in every
test.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 10 Feb 2020 09:46:07 +0000 (19:46 +1000)]
doc: add markdown for monospace rendering of defines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Michael Forney [Mon, 17 Jun 2019 00:18:00 +0000 (17:18 -0700)]
Only use GCC pragma on GCC
Signed-off-by: Michael Forney <mforney@mforney.org>
Michael Forney [Mon, 17 Jun 2019 00:14:18 +0000 (17:14 -0700)]
Avoid initializer index range
This is a GNU C extension, and is not available in ISO C.
Instead, just explicitly initialize other indices to -1.
Signed-off-by: Michael Forney <mforney@mforney.org>
Michael Forney [Mon, 17 Jun 2019 00:05:30 +0000 (17:05 -0700)]
Add fallback min/max for compilers that don't have statement expressions
Statement expressions are a GNU C extension and are not available
in ISO C.
On compilers that don't have them, define these macros as plain
conditional expressions, since they are only ever used with expressions
that have no side-effects.
The statement-expression version is still retained as an added
safety measure on GNU-compatible compilers.
Signed-off-by: Michael Forney <mforney@mforney.org>
Peter Hutterer [Thu, 6 Feb 2020 00:36:17 +0000 (10:36 +1000)]
test: add mangle_path to the excluded symbols leak list
Don't 100% know where it comes from but it's not ours, so...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 6 Feb 2020 00:23:45 +0000 (10:23 +1000)]
gitlab CI: some more centos deduplication
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 6 Feb 2020 00:22:48 +0000 (10:22 +1000)]
gitlab CI: don't run distcheck on centos 7 anymore
With
b65be7aa79 the centos 7 RPMs don't include doxygen anymore, so let's drop
the distcheck job. Centos 7 is old enough at this point that we don't need to
care too much.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Feb 2020 10:38:26 +0000 (20:38 +1000)]
gitlab CI: force a rebuild of all the docker containers
To make sure the current pipeline is correct
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Feb 2020 10:35:44 +0000 (20:35 +1000)]
gitlab CI: switch the custom builds to Fedora 31
With
b65be7aa79 the centos 7 RPMs don't include doxygen anymore, causing a CI
pipeline failure (but only where the centos image is being rebuilt).
Fedora is a better early-warning system about possible breakages than Centos -
which was originally chosen precisely because it doesn't update much and was
faster to run in the CI (this was before custom docker images).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 18 Nov 2019 03:42:40 +0000 (13:42 +1000)]
test: replace the SW_LID tests with SW_HEADPHONE_INSERT
We're only testing EV_SW event delivery here and SW_LID has the tendency to
suspend the host when we don't specifically inhibit it. So let's just swap for
the next one.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 24 Oct 2019 23:50:48 +0000 (09:50 +1000)]
CI: add a Centos 8 container build
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Nov 2019 04:40:08 +0000 (14:40 +1000)]
CI: deduplicate distcheck by making it a variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Nov 2019 04:32:07 +0000 (14:32 +1000)]
CI: move the configure flags into a variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 25 Oct 2019 00:17:46 +0000 (00:17 +0000)]
CI: extend the CI to work with containers
Mostly copy/paste from libinput but we do build on debian and centos as well.
The special builds are basically the same as before.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 23 Oct 2019 03:13:50 +0000 (03:13 +0000)]
make-event-names.py should take the files as argument
Don't rely on cat, just let our script read everything as required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Alexander Dahl [Thu, 12 Sep 2019 13:43:11 +0000 (15:43 +0200)]
doc: Fix function names in simple code example
That code did not compile because those functions were only renamed in
header and code back then, but not in the example.
Fixes:
ab2f20bfd6ad ("Revamp the API once again")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Aug 2019 04:35:54 +0000 (14:35 +1000)]
libevdev 1.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Aug 2019 04:33:19 +0000 (14:33 +1000)]
include: sync event codes with kernel 5.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Nayan Deshmukh [Sun, 4 Aug 2019 11:58:56 +0000 (20:58 +0900)]
doc: add a note regarding truncation of id_* fields
The id_* fields are 16 bits in linux/input.h and we mirror
the kernel API here. Even though we accept an int for this
fields in ABI the value is truncated at 16 bits.
Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 14 Jun 2019 01:18:37 +0000 (11:18 +1000)]
Initialize the slots correctly when enabling ABS_MT_SLOT
Previously, enabling or disabling ABS_MT_SLOT would not change the actual
slots, it was treated as a normal bitflag. This means we couldn't initialize a
libevdev context from scratch and have it behave like a correct MT context.
Fixes #4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Jun 2019 22:16:12 +0000 (08:16 +1000)]
doc: fix a typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 Jun 2019 01:36:08 +0000 (11:36 +1000)]
libevdev 1.7.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 Jun 2019 01:15:12 +0000 (11:15 +1000)]
doc: fix distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 Jun 2019 00:52:01 +0000 (10:52 +1000)]
doc: minor documentation updates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 Jun 2019 00:36:24 +0000 (10:36 +1000)]
doc: add libinput's doxygen styles
Minor modifications to the style, but at least this is readable now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jun 2019 07:40:06 +0000 (17:40 +1000)]
doc: drop the custom stylesheet
Revert back to the normal doxygen looks, even though they're pretty awful. But
at least they're consistent, the custom stylesheets had all sorts of weird
corner cases that didnt' render correctly and I don't have enough CSS
knowledge to fix this correctly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jun 2019 07:37:30 +0000 (17:37 +1000)]
doc: a change of the CSS needs to trigger a doxygen rebuild
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jun 2019 07:01:52 +0000 (17:01 +1000)]
doc: change @retval documentation to help doxygen with rendering
This causes some weird rendering, let's split it into a list (which also
happens to be more readable).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jun 2019 06:50:31 +0000 (16:50 +1000)]
doc: fix some doxygen layout
The linewrapped 1 caused doxygen to start a list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jun 2019 06:38:09 +0000 (16:38 +1000)]
doc: fix some doxygen warnings
warning: explicit link request to 'defines' could not be resolved
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 May 2019 00:54:14 +0000 (10:54 +1000)]
libevdev 1.7rc1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 7 May 2019 00:30:40 +0000 (10:30 +1000)]
include: sync event codes with kernel 5.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 19 Mar 2019 01:44:33 +0000 (11:44 +1000)]
Add a code-based name lookup function
Two new function pairs:
libevdev_event_code_from_code_name()
libevdev_event_type_from_code_name()
libevdev_event_code_from_code_name_n()
libevdev_event_type_from_code_name_n()
These functions look up event codes/types by the name of the event code only,
removing the need to figure out what event type an event code has. So if all
you have is "BTN_TOUCH", you can now look up the type and code for that,
without having to check the prefix yourself to guess at the type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 16 Jan 2019 03:55:25 +0000 (13:55 +1000)]
Don't read events unless required
With the previous approach, every libevdev_next_event() invocation triggered a
read() on the device fd. This is not efficient, the kernel provides whole
event frames at a time so we're guaranteed to have more events waiting unless
the current event is a SYN_REPORT.
Assuming a fast-enough client and e.g. a touchpad device with multiple axes
per frame, we'd thus trigger several unnecessary read() calls per event frame.
Drop this behavior, instead only trigger the read when our internal queue is
empty and we need more events.
Fallout:
- we don't have any warning about a too-slow sync, i.e. if a SYN_DROPPED
arrives while we're syncing, we don't get a warning in the log anymore.
the test for this was removed.
- the tests that required the specific behavior were rewritten accordingly
- a revoke on a kernel device doesn't return ENODEV until already-received
events have been processed
The above shouldn't be an issue for existing real-world clients.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 Mar 2019 00:56:28 +0000 (10:56 +1000)]
include: sync event codes with kernel 5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 16 Jan 2019 03:17:33 +0000 (13:17 +1000)]
Replace ABS_MT_SLOT - 1 with the v4.20 ABS_RESERVED define
ABS_RESERVED was added to 4.20 for that reason, to keep that event code
reserved so we can't use it for anything else (and thus mess up the fake MT
detection).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 16 Jan 2019 03:15:05 +0000 (13:15 +1000)]
include: sync event codes with kernel 4.20
Peter Hutterer [Thu, 25 Oct 2018 23:50:23 +0000 (09:50 +1000)]
libevdev 1.6.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 Oct 2018 08:49:33 +0000 (18:49 +1000)]
include: sync event codes with kernel 4.19
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 03:51:43 +0000 (13:51 +1000)]
Add libevdev_event_value_get_name() to resolve ABS_MT_TOOL_TYPE values
ABS_MT_TOOL_TYPE values are an enum, not a numerical value like all other
axes. So let's allow converting those values to string.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 18 Jun 2018 04:18:07 +0000 (14:18 +1000)]
Resolve the names "SW_MAX" and friends
Some of the *_MAX names are duplicates and have a real define. These were not
resolved until now.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 18 Jun 2018 04:45:07 +0000 (14:45 +1000)]
make-event-names: minor cleanups for readability
Two variable renames for less ambiguity
Two changes from an long if condition to a "if foo in [...]"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 9 Jul 2018 01:48:21 +0000 (11:48 +1000)]
test: add a test timeout multiplier for valgrind
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 9 Jul 2018 01:13:03 +0000 (11:13 +1000)]
GitLab CI: actually reference the default artifacts
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 29 Jun 2018 01:23:36 +0000 (11:23 +1000)]
GitLab CI: build with the various options
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 05:41:01 +0000 (15:41 +1000)]
Add GitLab CI
A simple version of it, we just pull down a few popular distros, build on them
and make sure distcheck passes.
https://gitlab.freedesktop.org/libevdev/libevdev/issues/2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 06:23:04 +0000 (16:23 +1000)]
configure.ac: remove --disable-test-run
This flag was used to disable test runs during make distcheck. Now that we
have more checks and the environment variable, we can drop this flag.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 29 Jun 2018 01:49:51 +0000 (11:49 +1000)]
configure.ac: fix the gcov linker flags
Presumably this worked, but it certainly doesn't work anymore (neither on
RHEL7 nor on Fedora 28)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 29 Jun 2018 01:13:44 +0000 (11:13 +1000)]
test: add LIBEVDEV_SKIP_ROOT_TESTS environment variable check
Depending on the container, or other checks don't always work. Add an extra
environment variable instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 05:18:17 +0000 (15:18 +1000)]
test: move the kernel test to the same infrastructure
We previously had this separate because it tested separate things. Now the
setup is generic enough that we should just re-use it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 05:08:53 +0000 (15:08 +1000)]
test: check for the device nodes to exist before testing
Even if we're root we may be running in a container without input device
nodes. In which case we should skip the test, not fail.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 04:40:18 +0000 (14:40 +1000)]
test: split some non-root tests into separate binaries
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 04:51:19 +0000 (14:51 +1000)]
test: sort-of autodetect whether we need root privileges
It's not really autodetection, we just declare the test suites that need root
privs. But this way we can generically check for it from the main() that we
re-use across tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 04:36:37 +0000 (14:36 +1000)]
test: automate test suite handling
Move all tests to a special section, then loop through that section
to fetch all test suite. The result is that new tests only need to add the
source files without having to update everything else as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jun 2018 04:13:59 +0000 (14:13 +1000)]
test: rename some tests for less ambiguity
"key" usually refers to one of KEY_ of EV_KEY in general, but here we're
testing event codes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 Jun 2018 08:20:03 +0000 (18:20 +1000)]
Change all URLs to gitlab.fdo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Deepa Dinamani [Tue, 16 Jan 2018 00:21:08 +0000 (16:21 -0800)]
Update struct input_event
The struct input_event is not y2038 safe.
Update the struct according to the kernel patch:
https://lkml.org/lkml/2018/1/6/324
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 2 Apr 2018 21:04:12 +0000 (07:04 +1000)]
include: sync event codes with kernel 4.16
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 8 Mar 2018 05:25:28 +0000 (15:25 +1000)]
libevdev 1.5.9
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 26 Feb 2018 07:09:48 +0000 (17:09 +1000)]
test: skip tests when we're not root
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 26 Feb 2018 07:02:41 +0000 (17:02 +1000)]
Blacklist SW_MAX so it doesn't shadow SW_PEN_INSERTED
They have the same value, so the _MAX code would shadow the real code, causing
issues in any client that needs to get all event names from libevdev.
Specifically, the loop of:
for each code in 0 to max-for-type:
print(name)
would not show up the code (but the _MAX) code instead. This causes issues
with clients that rely on name resolution that works. And the _MAX values are
special values anyway.
Blacklist it in the script here, causing it to resolve from name to code, but
not from code to name (like other duplicated codes).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 26 Feb 2018 06:59:58 +0000 (16:59 +1000)]
Blacklist REP_MAX so it doesn't shadow REP_PERIOD
They have the same value, so the _MAX code would shadow the real code, causing
issues in any client that needs to get all event names from libevdev.
Specifically, the loop of:
for each code in 0 to max-for-type:
print(name)
would not show up the code (but the _MAX) code instead. This causes issues
with clients that rely on name resolution that works. And the _MAX values are
special values anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 26 Feb 2018 06:53:55 +0000 (16:53 +1000)]
Drop the python map printing
leftover from when this was part of evemu
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jan 2018 04:17:50 +0000 (14:17 +1000)]
libevdev 1.5.8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 28 Jan 2018 21:59:49 +0000 (07:59 +1000)]
Sync with kernel 4.15 (BTN_STYLUS3)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 12 Dec 2017 23:46:15 +0000 (09:46 +1000)]
test: add --no-install flag to be able to debug directly
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 12 Dec 2017 23:20:55 +0000 (09:20 +1000)]
When changing the fd, reset our grab state to ungrabbed
Previously, calling grabbing a device after changing the fd was a no-op
because libevdev's grab state didn't match the fd:
libevdev_grab(LIBEVDEV_GRAB);
.. fd is grabbed
.. internal state is 'grabbed'
libevdev_change_fd();
.. new fd is ungrabbed
.. internal state is 'grabbed'
libevdev_grab(LIBEVDEV_GRAB);
.. argument matches internal state and we exit without grabbing the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Sep 2017 02:44:14 +0000 (12:44 +1000)]
include: sync with kernel 4.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jul 2017 00:13:06 +0000 (10:13 +1000)]
tools: add a script to sync the kernel header files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Jul 2017 00:12:56 +0000 (10:12 +1000)]
include: sync with kernel v4.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 31 May 2017 23:28:57 +0000 (09:28 +1000)]
uinput: make a note that the syspath we return is the input node
And not the syspath for the /dev/input/eventX node
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 9 May 2017 03:39:46 +0000 (13:39 +1000)]
test: remove test for ULONG_MAX queue allocation
Fixes the warning:
../libevdev/libevdev-int.h:231:15: warning: argument 1 value
‘
18446744073709551615’ exceeds maximum object size
9223372036854775807
[-Walloc-size-larger-than=]
That's now part of gcc's -Wall, so let's rely on that for code. Arguably, the
queue code is simple enough that we don't need a test for ENOMEM anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 8 May 2017 22:13:53 +0000 (08:13 +1000)]
test: drop unused parameters from test's main()
Not needed, so let's get rid of the compiler warning.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>