* [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices
@ 2025-12-20 20:48 Alex Tran
2026-01-10 9:20 ` Jiri Kosina
0 siblings, 1 reply; 4+ messages in thread
From: Alex Tran @ 2025-12-20 20:48 UTC (permalink / raw)
To: jikos, bentiss, shuah
Cc: linux-input, linux-kselftest, linux-kernel, Alex Tran
Verify Wacom devices set INPUT_PROP_DIRECT on display devices and
INPUT_PROP_POINTER on opaque devices. Moved test_prop_pointer into
TestOpaqueTablet. Created a DirectTabletTest mixin class for
test_prop_direct that can be inherited by display tablet test classes.
Used DirectTabletTest for TestDTH2452Tablet case.
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
---
Changes in v2:
- Removed the tests from the BaseTest class
- Removed disabling tests for certain subclasses
- Moved test_prop_pointer under TestOpaqueTablet
- Created DirectTabletTest mixin class
- Moved test_prop_direct under TestDTH2452Tablet
.../selftests/hid/tests/test_wacom_generic.py | 30 +++++++++++--------
1 file changed, 17 insertions(+), 13 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..9d0b0802d 100644
--- a/tools/testing/selftests/hid/tests/test_wacom_generic.py
+++ b/tools/testing/selftests/hid/tests/test_wacom_generic.py
@@ -598,18 +598,6 @@ class BaseTest:
if unit_set:
assert required[usage].contains(field)
- def test_prop_direct(self):
- """
- Todo: Verify that INPUT_PROP_DIRECT is set on display devices.
- """
- pass
-
- def test_prop_pointer(self):
- """
- Todo: Verify that INPUT_PROP_POINTER is set on opaque devices.
- """
- pass
-
class PenTabletTest(BaseTest.TestTablet):
def assertName(self, uhdev):
@@ -677,6 +665,13 @@ class TestOpaqueTablet(PenTabletTest):
uhdev.event(130, 240, pressure=0), [], auto_syn=False, strict=True
)
+ def test_prop_pointer(self):
+ """
+ Verify that INPUT_PROP_POINTER is set on opaque devices.
+ """
+ evdev = self.uhdev.get_evdev()
+ assert libevdev.INPUT_PROP_POINTER in evdev.properties
+
class TestOpaqueCTLTablet(TestOpaqueTablet):
def create_device(self):
@@ -862,7 +857,16 @@ class TestPTHX60_Pen(TestOpaqueCTLTablet):
)
-class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest):
+class DirectTabletTest():
+ def test_prop_direct(self):
+ """
+ Verify that INPUT_PROP_DIRECT is set on display devices.
+ """
+ evdev = self.uhdev.get_evdev()
+ assert libevdev.INPUT_PROP_DIRECT in evdev.properties
+
+
+class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest, DirectTabletTest):
ContactIds = namedtuple("ContactIds", "contact_id, tracking_id, slot_num")
def create_device(self):
--
2.51.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices
2025-12-20 20:48 [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices Alex Tran
@ 2026-01-10 9:20 ` Jiri Kosina
2026-01-23 22:54 ` Erin Skomra
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2026-01-10 9:20 UTC (permalink / raw)
To: Alex Tran
Cc: Benjamin Tissoires, shuah, linux-input, linux-kselftest,
linux-kernel, Benjamin Tissoires, Ping Cheng, Jason Gerecke
On Sat, 20 Dec 2025, Alex Tran wrote:
> Verify Wacom devices set INPUT_PROP_DIRECT on display devices and
> INPUT_PROP_POINTER on opaque devices. Moved test_prop_pointer into
> TestOpaqueTablet. Created a DirectTabletTest mixin class for
> test_prop_direct that can be inherited by display tablet test classes.
> Used DirectTabletTest for TestDTH2452Tablet case.
>
> Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
Let me CC Benjamin and Wacom folks to take a look here as well.
> ---
> Changes in v2:
> - Removed the tests from the BaseTest class
> - Removed disabling tests for certain subclasses
> - Moved test_prop_pointer under TestOpaqueTablet
> - Created DirectTabletTest mixin class
> - Moved test_prop_direct under TestDTH2452Tablet
> .../selftests/hid/tests/test_wacom_generic.py | 30 +++++++++++--------
> 1 file changed, 17 insertions(+), 13 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..9d0b0802d 100644
> --- a/tools/testing/selftests/hid/tests/test_wacom_generic.py
> +++ b/tools/testing/selftests/hid/tests/test_wacom_generic.py
> @@ -598,18 +598,6 @@ class BaseTest:
> if unit_set:
> assert required[usage].contains(field)
>
> - def test_prop_direct(self):
> - """
> - Todo: Verify that INPUT_PROP_DIRECT is set on display devices.
> - """
> - pass
> -
> - def test_prop_pointer(self):
> - """
> - Todo: Verify that INPUT_PROP_POINTER is set on opaque devices.
> - """
> - pass
> -
>
> class PenTabletTest(BaseTest.TestTablet):
> def assertName(self, uhdev):
> @@ -677,6 +665,13 @@ class TestOpaqueTablet(PenTabletTest):
> uhdev.event(130, 240, pressure=0), [], auto_syn=False, strict=True
> )
>
> + def test_prop_pointer(self):
> + """
> + Verify that INPUT_PROP_POINTER is set on opaque devices.
> + """
> + evdev = self.uhdev.get_evdev()
> + assert libevdev.INPUT_PROP_POINTER in evdev.properties
> +
>
> class TestOpaqueCTLTablet(TestOpaqueTablet):
> def create_device(self):
> @@ -862,7 +857,16 @@ class TestPTHX60_Pen(TestOpaqueCTLTablet):
> )
>
>
> -class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest):
> +class DirectTabletTest():
> + def test_prop_direct(self):
> + """
> + Verify that INPUT_PROP_DIRECT is set on display devices.
> + """
> + evdev = self.uhdev.get_evdev()
> + assert libevdev.INPUT_PROP_DIRECT in evdev.properties
> +
> +
> +class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest, DirectTabletTest):
> ContactIds = namedtuple("ContactIds", "contact_id, tracking_id, slot_num")
>
> def create_device(self):
> --
> 2.51.0
>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices
2026-01-10 9:20 ` Jiri Kosina
@ 2026-01-23 22:54 ` Erin Skomra
2026-01-25 21:31 ` Alex Tran
0 siblings, 1 reply; 4+ messages in thread
From: Erin Skomra @ 2026-01-23 22:54 UTC (permalink / raw)
To: Jiri Kosina
Cc: Alex Tran, Benjamin Tissoires, shuah, linux-input,
linux-kselftest, linux-kernel, Ping Cheng, Jason Gerecke
Hi all and thanks so much to Alex for the patch.
We tested and reviewed the patch and everything looks good with one suggestion.
Since the properties are mutually exclusive we'd like you to add one
line to each prop test asserting that the opposite property is NOT
set.
Thanks again,
Erin Skomra
Software Engineer II at Wacom
On Sat, Jan 10, 2026 at 1:20 AM Jiri Kosina <jikos@kernel.org> wrote:
>
> On Sat, 20 Dec 2025, Alex Tran wrote:
>
> > Verify Wacom devices set INPUT_PROP_DIRECT on display devices and
> > INPUT_PROP_POINTER on opaque devices. Moved test_prop_pointer into
> > TestOpaqueTablet. Created a DirectTabletTest mixin class for
> > test_prop_direct that can be inherited by display tablet test classes.
> > Used DirectTabletTest for TestDTH2452Tablet case.
> >
> > Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
>
> Let me CC Benjamin and Wacom folks to take a look here as well.
>
> > ---
> > Changes in v2:
> > - Removed the tests from the BaseTest class
> > - Removed disabling tests for certain subclasses
> > - Moved test_prop_pointer under TestOpaqueTablet
> > - Created DirectTabletTest mixin class
> > - Moved test_prop_direct under TestDTH2452Tablet
> > .../selftests/hid/tests/test_wacom_generic.py | 30 +++++++++++--------
> > 1 file changed, 17 insertions(+), 13 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..9d0b0802d 100644
> > --- a/tools/testing/selftests/hid/tests/test_wacom_generic.py
> > +++ b/tools/testing/selftests/hid/tests/test_wacom_generic.py
> > @@ -598,18 +598,6 @@ class BaseTest:
> > if unit_set:
> > assert required[usage].contains(field)
> >
> > - def test_prop_direct(self):
> > - """
> > - Todo: Verify that INPUT_PROP_DIRECT is set on display devices.
> > - """
> > - pass
> > -
> > - def test_prop_pointer(self):
> > - """
> > - Todo: Verify that INPUT_PROP_POINTER is set on opaque devices.
> > - """
> > - pass
> > -
> >
> > class PenTabletTest(BaseTest.TestTablet):
> > def assertName(self, uhdev):
> > @@ -677,6 +665,13 @@ class TestOpaqueTablet(PenTabletTest):
> > uhdev.event(130, 240, pressure=0), [], auto_syn=False, strict=True
> > )
> >
> > + def test_prop_pointer(self):
> > + """
> > + Verify that INPUT_PROP_POINTER is set on opaque devices.
> > + """
> > + evdev = self.uhdev.get_evdev()
> > + assert libevdev.INPUT_PROP_POINTER in evdev.properties
> > +
> >
> > class TestOpaqueCTLTablet(TestOpaqueTablet):
> > def create_device(self):
> > @@ -862,7 +857,16 @@ class TestPTHX60_Pen(TestOpaqueCTLTablet):
> > )
> >
> >
> > -class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest):
> > +class DirectTabletTest():
> > + def test_prop_direct(self):
> > + """
> > + Verify that INPUT_PROP_DIRECT is set on display devices.
> > + """
> > + evdev = self.uhdev.get_evdev()
> > + assert libevdev.INPUT_PROP_DIRECT in evdev.properties
> > +
> > +
> > +class TestDTH2452Tablet(test_multitouch.BaseTest.TestMultitouch, TouchTabletTest, DirectTabletTest):
> > ContactIds = namedtuple("ContactIds", "contact_id, tracking_id, slot_num")
> >
> > def create_device(self):
> > --
> > 2.51.0
> >
>
> --
> Jiri Kosina
> SUSE Labs
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices
2026-01-23 22:54 ` Erin Skomra
@ 2026-01-25 21:31 ` Alex Tran
0 siblings, 0 replies; 4+ messages in thread
From: Alex Tran @ 2026-01-25 21:31 UTC (permalink / raw)
To: Erin Skomra
Cc: Jiri Kosina, Benjamin Tissoires, shuah, linux-input,
linux-kselftest, linux-kernel, Ping Cheng, Jason Gerecke
On Sat, Jan 24, 2026 at 5:54 AM Erin Skomra <skomra@gmail.com> wrote:
>
> Hi all and thanks so much to Alex for the patch.
>
> We tested and reviewed the patch and everything looks good with one suggestion.
>
> Since the properties are mutually exclusive we'd like you to add one
> line to each prop test asserting that the opposite property is NOT
> set.
>
Sure, I'll send in a revision v3 with the addition. Thanks for the feedback.
--
Yours,
Alex Tran
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-25 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-20 20:48 [PATCH v2 RESEND] selftests: hid: tests: test_wacom_generic: add tests for display devices and opaque devices Alex Tran
2026-01-10 9:20 ` Jiri Kosina
2026-01-23 22:54 ` Erin Skomra
2026-01-25 21:31 ` Alex Tran
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®