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 /tools | |
| parent | 6ee149f61bcce39692f0335a01e99355d4cec8da (diff) | |
| download | linux-7a79e7daa84e230266184a2018507551086c2317.tar.gz linux-7a79e7daa84e230266184a2018507551086c2317.tar.bz2 linux-7a79e7daa84e230266184a2018507551086c2317.zip | |
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 'tools')
| -rwxr-xr-x | tools/testing/selftests/kselftest/module.sh | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/lib/Makefile | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/lib/config | 1 | ||||
| -rwxr-xr-x | tools/testing/selftests/lib/printf.sh | 4 |
4 files changed, 2 insertions, 7 deletions
diff --git a/tools/testing/selftests/kselftest/module.sh b/tools/testing/selftests/kselftest/module.sh index fb4733faff12..51fb65159932 100755 --- a/tools/testing/selftests/kselftest/module.sh +++ b/tools/testing/selftests/kselftest/module.sh @@ -11,7 +11,7 @@ # SPDX-License-Identifier: GPL-2.0+ # $(dirname $0)/../kselftest/module.sh "description" module_name # -# Example: tools/testing/selftests/lib/printf.sh +# Example: tools/testing/selftests/lib/bitmap.sh desc="" # Output prefix. module="" # Filename (without the .ko). diff --git a/tools/testing/selftests/lib/Makefile b/tools/testing/selftests/lib/Makefile index 66dcbe2e39fa..befc4ab2c671 100644 --- a/tools/testing/selftests/lib/Makefile +++ b/tools/testing/selftests/lib/Makefile @@ -4,5 +4,5 @@ # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" all: -TEST_PROGS := printf.sh bitmap.sh scanf.sh +TEST_PROGS := bitmap.sh scanf.sh include ../lib.mk diff --git a/tools/testing/selftests/lib/config b/tools/testing/selftests/lib/config index 306a3d4dca98..f4b4b8822241 100644 --- a/tools/testing/selftests/lib/config +++ b/tools/testing/selftests/lib/config @@ -1,4 +1,3 @@ -CONFIG_TEST_PRINTF=m CONFIG_TEST_SCANF=m CONFIG_TEST_BITMAP=m CONFIG_TEST_BITOPS=m diff --git a/tools/testing/selftests/lib/printf.sh b/tools/testing/selftests/lib/printf.sh deleted file mode 100755 index 05f4544e87f9..000000000000 --- a/tools/testing/selftests/lib/printf.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 -# Tests the printf infrastructure using test_printf kernel module. -$(dirname $0)/../kselftest/module.sh "printf" test_printf |
