diff options
author | Tobin C. Harding <tobin@kernel.org> | 2019-04-05 03:58:59 +0200 |
---|---|---|
committer | Shuah Khan <shuah@kernel.org> | 2019-04-09 00:44:21 +0200 |
commit | 0b0600c8c97abe070724140802f3b8c8aee93170 (patch) | |
tree | 38e4acc7d20c2ea2d27e2100d16da55b99e0e52d /tools/testing/selftests/lib | |
parent | lib/string: Add strscpy_pad() function (diff) | |
download | linux-0b0600c8c97abe070724140802f3b8c8aee93170.tar.xz linux-0b0600c8c97abe070724140802f3b8c8aee93170.zip |
lib: Add test module for strscpy_pad
Add a test module for the new strscpy_pad() function. Tie it into the
kselftest infrastructure for lib/ tests.
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Signed-off-by: Shuah Khan <shuah@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/strscpy.sh | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/testing/selftests/lib/Makefile b/tools/testing/selftests/lib/Makefile index 70d5711e3ac8..9f26635f3e57 100644 --- a/tools/testing/selftests/lib/Makefile +++ b/tools/testing/selftests/lib/Makefile @@ -3,6 +3,6 @@ # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" all: -TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh +TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh strscpy.sh include ../lib.mk diff --git a/tools/testing/selftests/lib/config b/tools/testing/selftests/lib/config index 126933bcc950..14a77ea4a8da 100644 --- a/tools/testing/selftests/lib/config +++ b/tools/testing/selftests/lib/config @@ -1,3 +1,4 @@ CONFIG_TEST_PRINTF=m CONFIG_TEST_BITMAP=m CONFIG_PRIME_NUMBERS=m +CONFIG_TEST_STRSCPY=m diff --git a/tools/testing/selftests/lib/strscpy.sh b/tools/testing/selftests/lib/strscpy.sh new file mode 100755 index 000000000000..71f2be6afba6 --- /dev/null +++ b/tools/testing/selftests/lib/strscpy.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0+ +$(dirname $0)/../kselftest_module.sh "strscpy*" test_strscpy |