diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2023-12-07 13:22:39 +0100 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2023-12-07 14:55:00 +0100 |
commit | da2c1b861065b452590d75a1e2f5ee9b396fef92 (patch) | |
tree | 2d175cd4efa5f64030f1a02bf8ef6643a84c47c4 /tools/testing/selftests/hid | |
parent | selftests/hid: fix ruff linter complains (diff) | |
download | linux-da2c1b861065b452590d75a1e2f5ee9b396fef92.tar.xz linux-da2c1b861065b452590d75a1e2f5ee9b396fef92.zip |
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 <jkosina@suse.com>
Link: https://lore.kernel.org/r/20231207-b4-wip-selftests-v1-1-c4e13fe04a70@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/testing/selftests/hid')
-rw-r--r-- | tools/testing/selftests/hid/tests/test_tablet.py | 4 |
1 files 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 |