linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] selftests: hid: tests: test_wacom_generic: add base test for display devices and opaque devices
@ 2025-11-17  1:47 Alex Tran
  2025-11-20 10:53 ` Benjamin Tissoires
  2025-11-21  0:04 ` [PATCH v2] selftests: hid: tests: test_wacom_generic: add tests " Alex Tran
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Tran @ 2025-11-17  1:47 UTC (permalink / raw)
  To: jikos, bentiss, shuah
  Cc: linux-input, linux-kselftest, linux-kernel, Alex Tran

Verify Wacom devices set INPUT_PROP_DIRECT appropriately on display devices
and INPUT_PROP_POINTER appropriately on opaque devices. Tests are defined
in the base class and disabled for inapplicable device types.

Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
---
 .../selftests/hid/tests/test_wacom_generic.py       | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/hid/tests/test_wacom_generic.py b/tools/testing/selftests/hid/tests/test_wacom_generic.py
index 2d6d04f0f..aa2a175f2 100644
--- a/tools/testing/selftests/hid/tests/test_wacom_generic.py
+++ b/tools/testing/selftests/hid/tests/test_wacom_generic.py
@@ -600,15 +600,17 @@ class BaseTest:
 
         def test_prop_direct(self):
             """
-            Todo: Verify that INPUT_PROP_DIRECT is set on display devices.
+            Verify that INPUT_PROP_DIRECT is set on display devices.
             """
-            pass
+            evdev = self.uhdev.get_evdev()
+            assert libevdev.INPUT_PROP_DIRECT in evdev.properties
 
         def test_prop_pointer(self):
             """
-            Todo: Verify that INPUT_PROP_POINTER is set on opaque devices.
+            Verify that INPUT_PROP_POINTER is set on opaque devices.
             """
-            pass
+            evdev = self.uhdev.get_evdev()
+            assert libevdev.INPUT_PROP_POINTER in evdev.properties
 
 
 class PenTabletTest(BaseTest.TestTablet):
@@ -622,6 +624,8 @@ class TouchTabletTest(BaseTest.TestTablet):
 
 
 class TestOpaqueTablet(PenTabletTest):
+    test_prop_direct = None
+
     def create_device(self):
         return OpaqueTablet()
 
@@ -864,6 +868,7 @@ class TestPTHX60_Pen(TestOpaqueCTLTablet):
 
 class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest):
     ContactIds = namedtuple("ContactIds", "contact_id, tracking_id, slot_num")
+    test_prop_pointer = None
 
     def create_device(self):
         return test_multitouch.Digitizer(
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-21  0:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  1:47 [PATCH v1] selftests: hid: tests: test_wacom_generic: add base test for display devices and opaque devices Alex Tran
2025-11-20 10:53 ` Benjamin Tissoires
2025-11-20 17:42   ` Alex Tran
2025-11-21  0:04 ` [PATCH v2] selftests: hid: tests: test_wacom_generic: add tests " Alex Tran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).