[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200513131532.GO11244@42.do-not-panic.com>
Date: Wed, 13 May 2020 13:15:32 +0000
From: Luis Chamberlain <mcgrof@...nel.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-mm@...ck.org, Ivan Teterevkov <ivan.teterevkov@...anix.com>,
Michal Hocko <mhocko@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Matthew Wilcox <willy@...radead.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
"Guilherme G . Piccoli" <gpiccoli@...onical.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v3 5/5] lib/test_sysctl: support testing of sysctl. boot
parameter
On Wed, May 13, 2020 at 10:58:16AM +0200, Vlastimil Babka wrote:
> On 5/11/20 8:31 PM, Luis Chamberlain wrote:
> > On Mon, May 11, 2020 at 01:05:22PM +0200, Vlastimil Babka wrote:
> >> ----8<----
> >> From a999e993a89e521b152bbd4b1466f69e62879c30 Mon Sep 17 00:00:00 2001
> >> From: Vlastimil Babka <vbabka@...e.cz>
> >> Date: Mon, 11 May 2020 12:59:49 +0200
> >> Subject: [PATCH] lib/test_sysctl: support testing of sysctl. boot parameter -
> >> fix
> >>
> >> Skip the new test if boot_int sysctl is not present, otherwise, per Luis,
> >> "This would fail if someone uses this script to test an older kernel, and
> >> the scripts in selftests are supposed to work with older kernels."
> >>
> >> Suggested-by: Luis Chamberlain <mcgrof@...nel.org>
> >> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
> >> ---
> >> tools/testing/selftests/sysctl/sysctl.sh | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh
> >> index ef6417b8067b..148704f465b5 100755
> >> --- a/tools/testing/selftests/sysctl/sysctl.sh
> >> +++ b/tools/testing/selftests/sysctl/sysctl.sh
> >> @@ -756,6 +756,11 @@ sysctl_test_0006()
> >
> > You want to:
> >
> >
> > # Kselftest framework requirement - SKIP code is 4.
> > ksft_skip=4
> >
> >> sysctl_test_0007()
> >> {
> >> TARGET="${SYSCTL}/boot_int"
> >> + if [ ! -f $TARGET ]; then
> >> + echo "Skipping test for $TARGET as it is not present ..."
> >> + return 0
> >> + fi
> >
> > And return 4 instead.
>
> If I return it from the function, nobody will care, AFAICS. If I 'exit
> $ksft_skip', is that correct if it's just a single test out of 7?
yes please do that.
Luis
Powered by blists - more mailing lists