| 89ea968a | 06-May-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed
udev-hid-bpf is still not installed everywhere, and we should probably not assume it is installed automatically.
Link: https:
selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed
udev-hid-bpf is still not installed everywhere, and we should probably not assume it is installed automatically.
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| b22cbfb4 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add tests for the Raptor Mach 2 joystick
The only interesting bit is the HAT switch, and we use a BPF program to fix it. So ensure this works correctly.
Link: https://lore.kernel.org
selftests/hid: add tests for the Raptor Mach 2 joystick
The only interesting bit is the HAT switch, and we use a BPF program to fix it. So ensure this works correctly.
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| c6b03c73 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: import base_gamepad.py from hid-tools
We need to slightly change base_device.py for supporting HID-BPF, so instead of monkey patching, let's just embed it in the kernel tree.
Link: h
selftests/hid: import base_gamepad.py from hid-tools
We need to slightly change base_device.py for supporting HID-BPF, so instead of monkey patching, let's just embed it in the kernel tree.
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 51de9ee0 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add Huion Kamvas Pro 19 tests
This tablets gets a lot of things wrong: - the secondary button is reported through Secondary Tip Switch - the third button is reported through Invert
W
selftests/hid: add Huion Kamvas Pro 19 tests
This tablets gets a lot of things wrong: - the secondary button is reported through Secondary Tip Switch - the third button is reported through Invert
We need to add some out of proximity intermediate state when moving back and forth with the eraser mode as it can only be triggered by physically returning the pen, meaning that the tolerated transitions can never happen.
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 03899011 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: add a couple of XP-PEN tablets
Those tablets don't need special initialization, but are reporting the events with the wrong usages: - tip switch is used when the eraser shoul
selftests/hid: tablets: add a couple of XP-PEN tablets
Those tablets don't need special initialization, but are reporting the events with the wrong usages: - tip switch is used when the eraser should be used - eraser is used instead of the secondary barrel switch
Add tests for those so we don't regress in the future.
Currently we set x/y tilt to 0 to not trigger the bpf program compensate_coordinates_by_tilt()
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| e14d88d9 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: reduce the number of pen state
All the *_WITH*BUTTON states were almost identical except for the button itself.
I need to add a new device with a third button, and adding a
selftests/hid: tablets: reduce the number of pen state
All the *_WITH*BUTTON states were almost identical except for the button itself.
I need to add a new device with a third button, and adding a bunch of states is going to be quite cumbersome.
So convert the `button` parameter of PenState as a boolean, and store which button is the target as an argument to all functions that need it.
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| e9064630 | 10-Apr-2024 |
Benjamin Tissoires <[email protected]> |
selftests/hid: add support for HID-BPF pre-loading before starting a test
few required changes: - we need to count how many times a udev 'bind' event happens - we need to tell `udev-hid-bpf` to not
selftests/hid: add support for HID-BPF pre-loading before starting a test
few required changes: - we need to count how many times a udev 'bind' event happens - we need to tell `udev-hid-bpf` to not automatically attach the provided HID-BPF objects - we need to manually attach the ones from the kernel tree, and wait for the second udev 'bind' event to happen
Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| da2c1b86 | 07-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: fix failing tablet button tests
An overlook from commit 74452d6329be ("selftests/hid: tablets: add variants of states with buttons"), where I don't use the Enum...
Fixes: 74452d6329b
selftests/hid: fix failing tablet button tests
An overlook from commit 74452d6329be ("selftests/hid: tablets: add variants of states with buttons"), where I don't use the Enum...
Fixes: 74452d6329be ("selftests/hid: tablets: add variants of states with buttons") Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| f556aa95 | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: fix ruff linter complains
rename ambiguous variables l, r, and m, and ignore the return values of uhdev.get_evdev() and uhdev.get_slot()
Acked-by: Jiri Kosina <[email protected]> Link
selftests/hid: fix ruff linter complains
rename ambiguous variables l, r, and m, and ignore the return values of uhdev.get_evdev() and uhdev.get_slot()
Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| ed5bc56c | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: fix mypy complains
No code change, only typing information added/ignored
Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-14-c0350c2
selftests/hid: fix mypy complains
No code change, only typing information added/ignored
Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| ab9b8290 | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: be stricter for some transitions
To accommodate for legacy devices, we rely on the last state of a transition to be valid: for example when we test PEN_IS_OUT_OF_RANGE to PEN
selftests/hid: tablets: be stricter for some transitions
To accommodate for legacy devices, we rely on the last state of a transition to be valid: for example when we test PEN_IS_OUT_OF_RANGE to PEN_IS_IN_CONTACT, any "normal" device that reports an InRange bit would insert a PEN_IS_IN_RANGE state between the 2.
This is of course valid, but this solution prevents to detect false releases emitted by some firmware: when pressing an "eraser mode" button, they might send an extra PEN_IS_OUT_OF_RANGE that we may want to filter.
So define 2 sets of transitions: one that is the ideal behavior, and one that is OK, it won't break user space, but we have serious doubts if we are doing the right thing. And depending on the test, either ask only for valid transitions, or tolerate weird ones.
Reviewed-by: Peter Hutterer <[email protected]> Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 1f01537e | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: convert the primary button tests
We get more descriptive in what we are doing, and also get more information of what is actually being tested. Instead of having a non exhaust
selftests/hid: tablets: convert the primary button tests
We get more descriptive in what we are doing, and also get more information of what is actually being tested. Instead of having a non exhaustive button changes that are semi-randomly done, we can describe all the states we want to test.
Reviewed-by: Peter Hutterer <[email protected]> Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| 74452d63 | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: add variants of states with buttons
Turns out that there are transitions that are unlikely to happen: for example, having both the tip switch and a button being changed at th
selftests/hid: tablets: add variants of states with buttons
Turns out that there are transitions that are unlikely to happen: for example, having both the tip switch and a button being changed at the same time (in the same report) would require either a very talented and precise user or a very bad hardware with a very low sampling rate.
So instead of manually building the button test by hand and forgetting about some cases, let's reuse the state machine and transitions we have.
This patch only adds the states and the valid transitions. The actual tests will be replaced later.
Reviewed-by: Peter Hutterer <[email protected]> Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| d8d7aa22 | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: do not set invert when the eraser is used
Turns out that the chart from Microsoft is not exactly what I got here: when the rubber is used, and is touching the surface, invert
selftests/hid: tablets: do not set invert when the eraser is used
Turns out that the chart from Microsoft is not exactly what I got here: when the rubber is used, and is touching the surface, invert can (should) be set to 0...
[0] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states
Reviewed-by: Peter Hutterer <[email protected]> Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|
| d52f5206 | 06-Dec-2023 |
Benjamin Tissoires <[email protected]> |
selftests/hid: tablets: move the transitions to PenState
Those transitions have nothing to do with `Pen`, so migrate them to `PenState`.
The hidden agenda is to remove `Pen` and integrate it into `
selftests/hid: tablets: move the transitions to PenState
Those transitions have nothing to do with `Pen`, so migrate them to `PenState`.
The hidden agenda is to remove `Pen` and integrate it into `PenDigitizer` so that we can tweak the events in each state to emulate firmware bugs.
Reviewed-by: Peter Hutterer <[email protected]> Acked-by: Jiri Kosina <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
show more ...
|