tools/testing/selftests/sysctl/sysctl.sh: support CONFIG_TEST_SYSCTL=y
authorVlastimil Babka <vbabka@suse.cz>
Mon, 8 Jun 2020 04:40:35 +0000 (21:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Jun 2020 18:05:56 +0000 (11:05 -0700)
The testing script recommends CONFIG_TEST_SYSCTL=y, but actually only
works with CONFIG_TEST_SYSCTL=m.  Testing of sysctl setting via boot
param however requires the test to be built-in, so make sure the test
script supports it.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: "Eric W . Biederman" <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Guilherme G . Piccoli" <gpiccoli@canonical.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Ivan Teterevkov <ivan.teterevkov@nutanix.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20200427180433.7029-5-vbabka@suse.cz
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/sysctl/sysctl.sh

index 6a970b127c9b3c2d979255b35ada380ba88fe281..a4262955d30f9a2ee15694608bfe23b9947bde79 100755 (executable)
@@ -122,7 +122,7 @@ test_reqs()
 
 function load_req_mod()
 {
-       if [ ! -d $DIR ]; then
+       if [ ! -d $SYSCTL ]; then
                if ! modprobe -q -n $TEST_DRIVER; then
                        echo "$0: module $TEST_DRIVER not found [SKIP]"
                        exit $ksft_skip