diff options
| author | Tamir Duberstein <tamird@gmail.com> | 2025-03-07 06:27:36 -0500 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-03-14 13:55:37 -0700 |
| commit | 97c1f302f2bc318ed88aa4a49641a3b60b33f7a5 (patch) | |
| tree | 6b2fce444173bae236b7f124e780cdf1639456cf /tools/testing/selftests/lib | |
| parent | 6340d61b9005de1fab86963ff38c9cfd66e68483 (diff) | |
scanf: convert self-test to KUnit
Convert the scanf() 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.
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Link: https://lore.kernel.org/r/20250307-scanf-kunit-convert-v9-3-b98820fa39ff@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/testing/selftests/lib')
| -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/scanf.sh | 4 |
3 files changed, 1 insertions, 6 deletions
diff --git a/tools/testing/selftests/lib/Makefile b/tools/testing/selftests/lib/Makefile index befc4ab2c671..f876bf4744e1 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 := bitmap.sh scanf.sh +TEST_PROGS := bitmap.sh include ../lib.mk diff --git a/tools/testing/selftests/lib/config b/tools/testing/selftests/lib/config index f4b4b8822241..81a1f64a22e8 100644 --- a/tools/testing/selftests/lib/config +++ b/tools/testing/selftests/lib/config @@ -1,3 +1,2 @@ -CONFIG_TEST_SCANF=m CONFIG_TEST_BITMAP=m CONFIG_TEST_BITOPS=m diff --git a/tools/testing/selftests/lib/scanf.sh b/tools/testing/selftests/lib/scanf.sh deleted file mode 100755 index b59b8ba561c3..000000000000 --- a/tools/testing/selftests/lib/scanf.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 -# Tests the scanf infrastructure using test_scanf kernel module. -$(dirname $0)/../kselftest/module.sh "scanf" test_scanf |
