aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/Kconfig
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-06-11 13:39:12 +0200
committerJiri Kosina <jkosina@suse.cz>2022-06-15 15:51:46 +0200
commit2d167aaba3864cf8f46b8364aa33e780de1da8f4 (patch)
tree939fdb3fb6003be1fab7a7e05d29b9ebf7a337ba /drivers/hid/Kconfig
parentHID: uclogic: Make template placeholder IDs generic (diff)
downloadlinux-dev-2d167aaba3864cf8f46b8364aa33e780de1da8f4.tar.xz
linux-dev-2d167aaba3864cf8f46b8364aa33e780de1da8f4.zip
HID: uclogic: Add KUnit tests for uclogic_rdesc_template_apply()
The uclogic_rdesc_template_apply() function is used by the driver to generate HID descriptors from templates. In order to avoid regressions in future patches, add KUnit tests to test the function. To run the tests: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid \ --kconfig_add CONFIG_VIRTIO_UML=y \ --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/Kconfig')
-rw-r--r--drivers/hid/Kconfig16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 70da5931082f..6ce92830b5d1 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1306,6 +1306,22 @@ config HID_MCP2221
To compile this driver as a module, choose M here: the module
will be called hid-mcp2221.ko.
+config HID_KUNIT_TEST
+ bool "KUnit tests for HID" if !KUNIT_ALL_TESTS
+ depends on KUNIT=y
+ depends on HID_UCLOGIC
+ default KUNIT_ALL_TESTS
+ help
+ This builds unit tests for HID. This option is not useful for
+ distributions or general kernels, but only for kernel
+ developers working on HID and associated drivers.
+
+ For more information on KUnit and unit tests in general,
+ please refer to the KUnit documentation in
+ Documentation/dev-tools/kunit/.
+
+ If in doubt, say "N".
+
endmenu
endif # HID