linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Iurii Zaikin <yzaikin@google.com>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	linux-mm@kvack.org, Ivan Teterevkov <ivan.teterevkov@nutanix.com>,
	Michal Hocko <mhocko@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	"Guilherme G . Piccoli" <gpiccoli@canonical.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: [PATCH v3 4/5] tools/testing/selftests/sysctl/sysctl.sh: support CONFIG_TEST_SYSCTL=y
Date: Mon, 27 Apr 2020 20:04:32 +0200	[thread overview]
Message-ID: <20200427180433.7029-5-vbabka@suse.cz> (raw)
In-Reply-To: <20200427180433.7029-1-vbabka@suse.cz>

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>
---
 tools/testing/selftests/sysctl/sysctl.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh
index 6a970b127c9b..ce1eeea6f769 100755
--- a/tools/testing/selftests/sysctl/sysctl.sh
+++ b/tools/testing/selftests/sysctl/sysctl.sh
@@ -42,7 +42,7 @@ ALL_TESTS="$ALL_TESTS 0006:50:1:bitmap_0001"
 
 test_modprobe()
 {
-       if [ ! -d $DIR ]; then
+       if [ ! -d $SYSCTL ]; then
                echo "$0: $DIR not present" >&2
                echo "You must have the following enabled in your kernel:" >&2
                cat $TEST_DIR/config >&2
@@ -122,9 +122,9 @@ test_reqs()
 
 function load_req_mod()
 {
-	if [ ! -d $DIR ]; then
+	if [ ! -d $DIR -a ! -d $SYSCTL ]; then
 		if ! modprobe -q -n $TEST_DRIVER; then
-			echo "$0: module $TEST_DRIVER not found [SKIP]"
+			echo "$0: module $TEST_DRIVER not found and not built-in [SKIP]"
 			exit $ksft_skip
 		fi
 		modprobe $TEST_DRIVER
-- 
2.26.0


  parent reply	other threads:[~2020-04-27 18:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 18:04 [PATCH v3 0/5] support setting sysctl parameters from kernel command line Vlastimil Babka
2020-04-27 18:04 ` [PATCH v3 1/5] kernel/sysctl: " Vlastimil Babka
2020-04-27 18:33   ` Andrew Morton
2020-04-28  8:09     ` Vlastimil Babka
2020-04-28 10:18       ` Michal Hocko
2020-04-27 18:04 ` [PATCH v3 2/5] kernel/sysctl: support handling command line aliases Vlastimil Babka
2020-04-27 18:04 ` [PATCH v3 3/5] kernel/hung_task convert hung_task_panic boot parameter to sysctl Vlastimil Babka
2020-04-27 18:04 ` Vlastimil Babka [this message]
2020-04-27 18:39   ` [PATCH v3 4/5] tools/testing/selftests/sysctl/sysctl.sh: support CONFIG_TEST_SYSCTL=y Luis Chamberlain
2020-04-27 18:04 ` [PATCH v3 5/5] lib/test_sysctl: support testing of sysctl. boot parameter Vlastimil Babka
2020-04-27 18:39   ` Luis Chamberlain
2020-05-11 11:05     ` Vlastimil Babka
2020-05-11 18:31       ` Luis Chamberlain
2020-05-13  8:58         ` Vlastimil Babka
2020-05-13 13:15           ` Luis Chamberlain
2020-05-13 13:17             ` Luis Chamberlain
2020-05-15 16:02               ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200427180433.7029-5-vbabka@suse.cz \
    --to=vbabka@suse.cz \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=ebiederm@xmission.com \
    --cc=gpiccoli@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivan.teterevkov@nutanix.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.org \
    --cc=yzaikin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).