| Age | Commit message (Collapse) | Author | Files | Lines |
|
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]>
|
|
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]>
|
|
More in line with the other test_* files.
No code change
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Peter Hutterer <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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]>
|
|
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]>
|
|
The values are taken from the HID-BPF file.
Basically we are recomputing the array provided there.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Peter Hutterer <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
The device is exported with a fuzz of 4, meaning that the `+ t` here
is removed by the fuzz algorithm, making those tests failing.
Not sure why, but when I run this locally it was passing, but not in the
VM of the CI.
Fixes: b0fb904d074e ("HID: wacom: Add additional tests of confidence behavior")
Link: https://gitlab.freedesktop.org/bentiss/hid/-/jobs/53692957#L3315
Acked-by: Jason Gerecke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
- functional fix for handling Confidence in Wacom driver (Jason Gerecke)
- power management fix for Wacom userspace battery exporting (Tatsunosuke Tobita)
Conflicts:
tools/testing/selftests/hid/tests/test_wacom_generic.py
|
|
Test for proper driver behavior when the touch confidence bit is set
or cleared. Test the three flavors of touch confidence loss (tipswitch
cleared before confidence, tipswitch and confidence cleared at the same
time, and tipswitch only cleared when touch is actually removed). Also
test two flavors of touch confidence gain (confidence added to a touch
that was "never" confident, and confidence added to a touch that was
previously confident).
Signed-off-by: Jason Gerecke <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Some tablets report 2 barrel switches. We better test those too.
Use the same transistions description from the primary button tests.
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]>
|
|
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]>
|
|
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]>
|
|
This introduces a little bit more readability by not using the raw values
but a dedicated Enum
Acked-by: Jiri Kosina <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
Avoids getting a null event when these usages are set
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]>
|
|
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]>
|
|
We can easily subclass PenDigitizer for introducing firmware bugs when
subclassing Pen is harder.
Move move_to from Pen to PenDigitizer so we get that ability
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]>
|
|
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]>
|
|
Looks like this is a leftover
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]>
|
|
We can actually have multiple occurences of `skip_if_uhdev` if we follow
the information from the pytest doc[0].
This is not immediately used, but can be if we need multiple conditions
on a given test.
[0] https://docs.pytest.org/en/latest/historical-notes.html#update-marker-code
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]>
|
|
Adding a wacom touch device to use the test_multitouch tests.
Adding a 2 additional tests.
- A test to check if a touch event is sent when the contact_id of the event is 0.
- A test to check if a touch event is not sent when confidence is set to 0.
Signed-off-by: Joshua Dickens <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
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.
This one gets skipped when run by vmtest.sh as we currently need to test
against actual kernel modules (.ko), not built-in to fetch the list
of supported devices.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Cc: Jose Torreguitar <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Cc: Roderick Colenbrander <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Cc: Kai-Heng Feng <[email protected]>
Cc: Roderick Colenbrander <[email protected]>
Cc: наб <[email protected]>
Cc: Blaž Hrastnik <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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 <[email protected]>
Cc: Roderick Colenbrander <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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: Nicolas Saenz Julienne <[email protected]>
Cc: Peter Hutterer <[email protected]>
Cc: Roderick Colenbrander <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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: Candle Sun <[email protected]>
Cc: Jose Torreguitar <[email protected]>
Cc: Peter Hutterer <[email protected]>
Cc: Roderick Colenbrander <[email protected]>
Cc: Silvan Jegen <[email protected]>
Signed-off-by: Silvan Jegen <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Roderick Colenbrander <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|
|
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.
I haven't imported all of hid-tools, the python module, but only the
tests related to the kernel. We can rely on pip to fetch the latest
hid-tools release, and then run the tests directly from the tree.
This should now be easier to request tests when something is not behaving
properly in the HID subsystem.
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
Cc: Peter Hutterer <[email protected]>
Signed-off-by: Peter Hutterer <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
|