]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/hid: Add initial hidraw tests skeleton
authorBenjamin Tissoires <bentiss@kernel.org>
Tue, 27 Aug 2024 08:19:31 +0000 (17:19 +0900)
committerBenjamin Tissoires <bentiss@kernel.org>
Thu, 29 Aug 2024 08:39:37 +0000 (10:39 +0200)
commit8163892a629ca544af575ce54955bf275a3250cd
treeccaa5e2ed60fd8b46f9350740624cd8b66f8e933
parent375e9bde9fc0fdb9e8d2339b06be5c2c2a5cb701
selftests/hid: Add initial hidraw tests skeleton

Largely inspired from hid_bpf.c for the fixture setup.

Create a couple of tests for hidraw:
- create a uhid device and check if the fixture is working properly
- inject one uhid event and read it through hidraw

These tests are not that useful for now, but will be once we start adding
the ioctl and BPFs to revoke the hidraw node.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://patch.msgid.link/20240827-hidraw-revoke-v5-3-d004a7451aea@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
tools/testing/selftests/hid/.gitignore
tools/testing/selftests/hid/Makefile
tools/testing/selftests/hid/hidraw.c [new file with mode: 0644]