From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- tools/testing/selftests/lib/Makefile | 9 +++++++++ tools/testing/selftests/lib/bitmap.sh | 3 +++ tools/testing/selftests/lib/config | 6 ++++++ tools/testing/selftests/lib/prime_numbers.sh | 4 ++++ tools/testing/selftests/lib/printf.sh | 4 ++++ tools/testing/selftests/lib/scanf.sh | 4 ++++ tools/testing/selftests/lib/strscpy.sh | 3 +++ 7 files changed, 33 insertions(+) create mode 100644 tools/testing/selftests/lib/Makefile create mode 100755 tools/testing/selftests/lib/bitmap.sh create mode 100644 tools/testing/selftests/lib/config create mode 100755 tools/testing/selftests/lib/prime_numbers.sh create mode 100755 tools/testing/selftests/lib/printf.sh create mode 100755 tools/testing/selftests/lib/scanf.sh create mode 100755 tools/testing/selftests/lib/strscpy.sh (limited to 'tools/testing/selftests/lib') diff --git a/tools/testing/selftests/lib/Makefile b/tools/testing/selftests/lib/Makefile new file mode 100644 index 000000000..ee71fc99d --- /dev/null +++ b/tools/testing/selftests/lib/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Makefile for lib/ function selftests + +# No binaries, but make sure arg-less "make" doesn't trigger "run_tests" +all: + +TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh scanf.sh strscpy.sh + +include ../lib.mk diff --git a/tools/testing/selftests/lib/bitmap.sh b/tools/testing/selftests/lib/bitmap.sh new file mode 100755 index 000000000..00a416fbc --- /dev/null +++ b/tools/testing/selftests/lib/bitmap.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +$(dirname $0)/../kselftest/module.sh "bitmap" test_bitmap diff --git a/tools/testing/selftests/lib/config b/tools/testing/selftests/lib/config new file mode 100644 index 000000000..645839b50 --- /dev/null +++ b/tools/testing/selftests/lib/config @@ -0,0 +1,6 @@ +CONFIG_TEST_PRINTF=m +CONFIG_TEST_SCANF=m +CONFIG_TEST_BITMAP=m +CONFIG_PRIME_NUMBERS=m +CONFIG_TEST_STRSCPY=m +CONFIG_TEST_BITOPS=m diff --git a/tools/testing/selftests/lib/prime_numbers.sh b/tools/testing/selftests/lib/prime_numbers.sh new file mode 100755 index 000000000..370b79a9c --- /dev/null +++ b/tools/testing/selftests/lib/prime_numbers.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Checks fast/slow prime_number generation for inconsistencies +$(dirname $0)/../kselftest/module.sh "prime numbers" prime_numbers selftest=65536 diff --git a/tools/testing/selftests/lib/printf.sh b/tools/testing/selftests/lib/printf.sh new file mode 100755 index 000000000..05f4544e8 --- /dev/null +++ b/tools/testing/selftests/lib/printf.sh @@ -0,0 +1,4 @@ +#!/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 diff --git a/tools/testing/selftests/lib/scanf.sh b/tools/testing/selftests/lib/scanf.sh new file mode 100755 index 000000000..b59b8ba56 --- /dev/null +++ b/tools/testing/selftests/lib/scanf.sh @@ -0,0 +1,4 @@ +#!/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 diff --git a/tools/testing/selftests/lib/strscpy.sh b/tools/testing/selftests/lib/strscpy.sh new file mode 100755 index 000000000..be60ef6e1 --- /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 -- cgit v1.2.3