Benjamin Tissoires
a4ee40b6ac
selftests: hid: import hid-tools hid-sony and hid-playstation tests
...
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
The code is taken from [1] to fix a change in v6.3.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Link: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/143 [1]
Cc: Roderick Colenbrander <roderick.colenbrander@sony.com >
Cc: Jose Torreguitar <jtguitar@google.com >
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
2023-04-12 17:13:38 +02:00
Benjamin Tissoires
ff3b2228e3
selftests: hid: import hid-tools hid-ite tests
...
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Cc: Peter Hutterer <peter.hutterer@who-t.net >
Cc: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
2023-04-12 17:13:38 +02:00
Benjamin Tissoires
9898fa5665
selftests: hid: import hid-tools hid-apple tests
...
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Cc: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
2023-04-12 17:13:38 +02:00
Benjamin Tissoires
1dec39d489
selftests: hid: import hid-tools wacom tests
...
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Cc: Jason Gerecke <killertofu@gmail.com >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
2023-04-12 17:13:38 +02:00
Benjamin Tissoires
0bb3ed717d
selftests: hid: import hid-tools hid-multitouch and hid-tablets tests
...
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
There are a lot of multitouch tests, and the default timeout of 45 seconds
is not big enough. Bump it to 200 seconds.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Cc: Peter Hutterer <peter.hutterer@who-t.net >
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com >
Cc: Roderick Colenbrander <roderick.colenbrander@sony.com >
Cc: наб <nabijaczleweli@nabijaczleweli.xyz >
Cc: Blaž Hrastnik <blaz@mxxn.io >
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz >
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
2023-04-12 17:13:37 +02:00
Benjamin Tissoires
22ef7d7be4
selftest: hid: fix hid_bpf not set in config
...
Now that CONFIG_HID_BPF is not automatically implied by HID, we need
to set it properly in the selftests config.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
Signed-off-by: Jiri Kosina <jkosina@suse.cz >
2023-02-23 15:45:25 +01:00
Benjamin Tissoires
d0b93a0d2b
selftests: hid: ensures we have the proper requirements in config
...
DYNAMIC_FTRACE_WITH_DIRECT_CALLS is implicit on x86_64 but is still a
WIP on aarm64. Ensure we get it selected to not have any surprises.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
Reviewed-by: Jiri Kosina <jkosina@suse.cz >
Link: https://lore.kernel.org/r/20221206145936.922196-5-benjamin.tissoires@redhat.com
2022-12-10 10:41:37 +01:00
Benjamin Tissoires
dbb60c8a26
selftests: add tests for the HID-bpf initial implementation
...
The tests are pretty basic:
- create a virtual uhid device that no userspace will like (to not mess
up the running system)
- attach a BPF prog to it
- open the matching hidraw node
- inject one event and check:
* that the BPF program can do something on the event stream
* can modify the event stream
- add another test where we attach/detach BPF programs to see if we get
errors
Note: the Makefile is extracted from selftests/bpf so we can rebuild
the libbpf and bpftool components from the current kernel tree without
relying on system installed components.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
Signed-off-by: Jiri Kosina <jkosina@suse.cz >
2022-11-15 16:28:29 +01:00