aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/sysctl/run_numerictests
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2017-07-12 14:33:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 16:26:00 -0700
commit64b671204afd71591e774e7237b7c862ac5bbd97 (patch)
tree83ec1f160eb846fcd19f265a418499d1d087a914 /tools/testing/selftests/sysctl/run_numerictests
parenttest_sysctl: add dedicated proc sysctl test driver (diff)
downloadwireguard-linux-64b671204afd71591e774e7237b7c862ac5bbd97.tar.xz
wireguard-linux-64b671204afd71591e774e7237b7c862ac5bbd97.zip
test_sysctl: add generic script to expand on tests
This adds a generic script to let us more easily add more tests cases. Since we really have only two types of tests cases just fold them into the one file. Each test unit is now identified into its separate function: # ./sysctl.sh -l Test ID list: TEST_ID x NUM_TEST TEST_ID: Test ID NUM_TESTS: Number of recommended times to run the test 0001 x 1 - tests proc_dointvec_minmax() 0002 x 1 - tests proc_dostring() For now we start off with what we had before, and run only each test once. We can now watch a test case until it fails: ./sysctl.sh -w 0002 We can also run a test case x number of times, say we want to run a test case 100 times: ./sysctl.sh -c 0001 100 To run a test case only once, for example: ./sysctl.sh -s 0002 The default settings are specified at the top of sysctl.sh. Link: http://lkml.kernel.org/r/20170630224431.17374-3-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/sysctl/run_numerictests')
-rwxr-xr-xtools/testing/selftests/sysctl/run_numerictests10
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/testing/selftests/sysctl/run_numerictests b/tools/testing/selftests/sysctl/run_numerictests
deleted file mode 100755
index c375ce0f4c15..000000000000
--- a/tools/testing/selftests/sysctl/run_numerictests
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-SYSCTL="/proc/sys/debug/test_sysctl/"
-TARGET="${SYSCTL}/int_0001"
-ORIG=$(cat "${TARGET}")
-TEST_STR=$(( $ORIG + 1 ))
-
-. ./common_tests
-
-exit_test