mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 11:34:58 +00:00
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
28 lines
835 B
Plaintext
28 lines
835 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
# ACPI WMI KUnit tests
|
|
#
|
|
|
|
config ACPI_WMI_MARSHALLING_KUNIT_TEST
|
|
tristate "KUnit Test for ACPI-WMI marshalling" if !KUNIT_ALL_TESTS
|
|
depends on KUNIT
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
This builds unit tests for the ACPI-WMI marshalling code.
|
|
|
|
For more information on KUnit and unit tests in general, please refer
|
|
to the KUnit documentation in Documentation/dev-tools/kunit/.
|
|
|
|
If unsure, say N.
|
|
|
|
config ACPI_WMI_STRING_KUNIT_TEST
|
|
tristate "KUnit Test for ACPI-WMI string conversion" if !KUNIT_ALL_TESTS
|
|
depends on KUNIT
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
This builds unit tests for the ACPI-WMI string conversion code.
|
|
For more information on KUnit and unit tests in general, please refer
|
|
to the KUnit documentation in Documentation/dev-tools/kunit/.
|
|
|
|
If unsure, say N.
|