* [PATCH] selftests/hid: fix failing tablet button tests
@ 2023-12-07 12:22 Benjamin Tissoires
2023-12-07 12:44 ` Jiri Kosina
2023-12-07 13:55 ` Benjamin Tissoires
0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2023-12-07 12:22 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Shuah Khan, Peter Hutterer
Cc: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kselftest,
linux-kernel
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")
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Not sure what happened, but I mustn't have run the tests before
sending the series, and they fail blatently.
I'm deeply sorry for that, I thought these failures were fixed.
Cheers,
Benjamin
---
tools/testing/selftests/hid/tests/test_tablet.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selftests/hid/tests/test_tablet.py
index dc8b0fe9e7f3..903f19f7cbe9 100644
--- a/tools/testing/selftests/hid/tests/test_tablet.py
+++ b/tools/testing/selftests/hid/tests/test_tablet.py
@@ -115,7 +115,7 @@ class PenState(Enum):
# we take only the highest button in account
for b in [libevdev.EV_KEY.BTN_STYLUS, libevdev.EV_KEY.BTN_STYLUS2]:
if bool(evdev.value[b]):
- button = b
+ button = BtnPressed(b)
# the kernel tends to insert an EV_SYN once removing the tool, so
# the button will be released after
@@ -155,7 +155,7 @@ class PenState(Enum):
if button_found:
raise ValueError(f"duplicated BTN_STYLUS* in {events}")
button_found = True
- button = ev.code if ev.value else None
+ button = BtnPressed(ev.code) if ev.value else None
# the kernel tends to insert an EV_SYN once removing the tool, so
# the button will be released after
---
base-commit: f556aa957df8cb3e98af0f54bf1fa65f59ae47a3
change-id: 20231207-b4-wip-selftests-c1565d4d4578
Best regards,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/hid: fix failing tablet button tests
2023-12-07 12:22 [PATCH] selftests/hid: fix failing tablet button tests Benjamin Tissoires
@ 2023-12-07 12:44 ` Jiri Kosina
2023-12-07 13:55 ` Benjamin Tissoires
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2023-12-07 12:44 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Benjamin Tissoires, Shuah Khan, Peter Hutterer, linux-input,
linux-kselftest, linux-kernel
On Thu, 7 Dec 2023, Benjamin Tissoires wrote:
> 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")
> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Acked-by: Jiri Kosina <jkosina@suse.com>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/hid: fix failing tablet button tests
2023-12-07 12:22 [PATCH] selftests/hid: fix failing tablet button tests Benjamin Tissoires
2023-12-07 12:44 ` Jiri Kosina
@ 2023-12-07 13:55 ` Benjamin Tissoires
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2023-12-07 13:55 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Shuah Khan, Peter Hutterer,
Benjamin Tissoires
Cc: Jiri Kosina, linux-input, linux-kselftest, linux-kernel
On Thu, 07 Dec 2023 13:22:39 +0100, Benjamin Tissoires wrote:
> An overlook from commit 74452d6329be ("selftests/hid: tablets: add
> variants of states with buttons"), where I don't use the Enum...
>
>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-6.8/selftests), thanks!
[1/1] selftests/hid: fix failing tablet button tests
https://git.kernel.org/hid/hid/c/da2c1b861065
Cheers,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-07 13:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 12:22 [PATCH] selftests/hid: fix failing tablet button tests Benjamin Tissoires
2023-12-07 12:44 ` Jiri Kosina
2023-12-07 13:55 ` Benjamin Tissoires
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®