]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/wmi: Add kunit test for the string conversion code
authorArmin Wolf <W_Armin@gmx.de>
Fri, 16 Jan 2026 20:41:11 +0000 (21:41 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 20 Jan 2026 13:47:52 +0000 (15:47 +0200)
commit0e1a8143e79713eef7e027737fed259aa58866e7
treebefaecd2905b80cd78c01324673c228cb2499e05
parentb990a06f7ec6dc3ceecd8015c3b421690f267122
platform/wmi: Add kunit test for the string conversion code

The string conversion frunctions provided by the WMI driver core
have no dependencies on the remaining WMI API, making them suitable
for unit tests.

Implement such a unit test using kunit. Those unit tests verify that
converting between WMI strings and UTF8 strings works as expected.
They also verify that edge cases are handled correctly.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20260116204116.4030-5-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/wmi/tests/Kconfig
drivers/platform/wmi/tests/Makefile
drivers/platform/wmi/tests/string_kunit.c [new file with mode: 0644]