]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/hid: tablets: add variants of states with buttons
authorBenjamin Tissoires <bentiss@kernel.org>
Wed, 6 Dec 2023 10:46:01 +0000 (11:46 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Thu, 7 Dec 2023 08:52:04 +0000 (09:52 +0100)
commit74452d6329be73dd2f5562005e5eef2c7bda7c5b
tree8b5a1fc170103adccbe41ab792b9ab5a89137bf0
parent83912f83fabcb5086613e6382756750390ed48aa
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 <peter.hutterer@who-t.net>
Acked-by: Jiri Kosina <jkosina@suse.com>
Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-10-c0350c2f5986@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
tools/testing/selftests/hid/tests/test_tablet.py