diff options
| author | Tamir Duberstein <tamird@gmail.com> | 2025-03-07 17:08:56 -0500 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-03-13 10:26:33 -0700 |
| commit | 7a79e7daa84e230266184a2018507551086c2317 (patch) | |
| tree | 4c70bb9920d5d301e640f0e82d8466b38e930ca0 /lib/Kconfig.debug | |
| parent | 6ee149f61bcce39692f0335a01e99355d4cec8da (diff) | |
printf: convert self-test to KUnit
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250307-printf-kunit-convert-v6-1-4d85c361c241@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'lib/Kconfig.debug')
| -rw-r--r-- | lib/Kconfig.debug | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 7e548b9e36b7..443036c36351 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2427,6 +2427,15 @@ config ASYNC_RAID6_TEST config TEST_HEXDUMP tristate "Test functions located in the hexdump module at runtime" +config PRINTF_KUNIT_TEST + tristate "KUnit test printf() family of functions at runtime" if !KUNIT_ALL_TESTS + depends on KUNIT + default KUNIT_ALL_TESTS + help + Enable this option to test the printf functions at runtime. + + If unsure, say N. + config STRING_KUNIT_TEST tristate "KUnit test string functions at runtime" if !KUNIT_ALL_TESTS depends on KUNIT @@ -2440,9 +2449,6 @@ config STRING_HELPERS_KUNIT_TEST config TEST_KSTRTOX tristate "Test kstrto*() family of functions at runtime" -config TEST_PRINTF - tristate "Test printf() family of functions at runtime" - config TEST_SCANF tristate "Test scanf() family of functions at runtime" |
