Skip to content

Commit

Permalink
selftests/hid: wacom: fix confidence tests
Browse files Browse the repository at this point in the history
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: b0fb904 ("HID: wacom: Add additional tests of confidence behavior")
Link: https://gitlab.freedesktop.org/bentiss/hid/-/jobs/53692957#L3315
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
Link: https://lore.kernel.org/r/20240117-b4-wip-wacom-tests-fixes-v1-1-f317784f3c36@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
  • Loading branch information
Benjamin Tissoires committed Jan 18, 2024
1 parent a9f1da0 commit 4d69586
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/testing/selftests/hid/tests/test_wacom_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ def make_contact(self, contact_id=0, t=0):
does not overlap with other contacts. The value of `t` may be
incremented over time to move the point along a linear path.
"""
x = 50 + 10 * contact_id + t
y = 100 + 100 * contact_id + t
x = 50 + 10 * contact_id + t * 11
y = 100 + 100 * contact_id + t * 11
return test_multitouch.Touch(contact_id, x, y)

def make_contacts(self, n, t=0):
Expand All @@ -902,8 +902,8 @@ def assert_contact(self, uhdev, evdev, contact_ids, t=0):
tracking_id = contact_ids.tracking_id
slot_num = contact_ids.slot_num

x = 50 + 10 * contact_id + t
y = 100 + 100 * contact_id + t
x = 50 + 10 * contact_id + t * 11
y = 100 + 100 * contact_id + t * 11

# If the data isn't supposed to be stored in any slots, there is
# nothing we can check for in the evdev stream.
Expand Down

0 comments on commit 4d69586

Please sign in to comment.