From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 283A3C2D0FD for ; Wed, 13 May 2020 13:15:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E598820661 for ; Wed, 13 May 2020 13:15:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E598820661 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7E58590012F; Wed, 13 May 2020 09:15:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 796C29000F3; Wed, 13 May 2020 09:15:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 684A790012F; Wed, 13 May 2020 09:15:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4DD539000F3 for ; Wed, 13 May 2020 09:15:36 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 03ACD181AEF1D for ; Wed, 13 May 2020 13:15:36 +0000 (UTC) X-FDA: 76811742672.28.mine43_6b101980c2c56 X-HE-Tag: mine43_6b101980c2c56 X-Filterd-Recvd-Size: 5129 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 May 2020 13:15:35 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id d184so7994747pfd.4 for ; Wed, 13 May 2020 06:15:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VEBUE/dt95vl+GkpIooPeRD206RTMRg0kBeuKHBdFMY=; b=sg5mZdUBrHOf/+Ae0t97fXz4K1PO6hnuBoOd4nnnZXJ1l8ze+YDEC3dodqwtT/FWl0 rD/L+ngCcpfh3LAeOUrxSKTBURqnTUq/X8Mjn2KU6qYvup5jYZY6qNfdrwInB0xZePAI /8ylCae0Qr2qq0R0txlJB+yWjTHlqYZDQc9YR9iuCgOK3a1Xa5VToSiUc3WPBnnRtu/u JSFabEVjw7Vk+CDU6tgzU+qP/nJ8wnGBgmjgwW/1TJM9eHUt8fwMBMtka2jnbz5jiMH+ OXxcJgAgRw0VJwoAut62KtuAGfZUj+xWVBA4iaLVjBUIt5EO543vzAV5aabIZlpLtiVa jX7A== X-Gm-Message-State: AGi0PuaTojv9gEZc5bcO22TH7qASpz7tfw8eLqOMa/A0sKue/MIkzpTT Mb9oF9Ajaygg5Jfn3UaLs6g= X-Google-Smtp-Source: APiQypJAq8SfvBNksU6hYHSrxfbgqlfrrNYtZxOc+SvIoDj8gVf3OcL5dVz0pBjX95ZNI7nn5szd2A== X-Received: by 2002:a63:e242:: with SMTP id y2mr23815627pgj.205.1589375734552; Wed, 13 May 2020 06:15:34 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id w73sm1970992pfd.113.2020.05.13.06.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 06:15:33 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id B2A064063E; Wed, 13 May 2020 13:15:32 +0000 (UTC) Date: Wed, 13 May 2020 13:15:32 +0000 From: Luis Chamberlain To: Vlastimil Babka Cc: Andrew Morton , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-mm@kvack.org, Ivan Teterevkov , Michal Hocko , David Rientjes , Matthew Wilcox , "Eric W . Biederman" , "Guilherme G . Piccoli" , Alexey Dobriyan , Thomas Gleixner , Greg Kroah-Hartman , Christian Brauner , Masami Hiramatsu Subject: Re: [PATCH v3 5/5] lib/test_sysctl: support testing of sysctl. boot parameter Message-ID: <20200513131532.GO11244@42.do-not-panic.com> References: <20200427180433.7029-1-vbabka@suse.cz> <20200427180433.7029-6-vbabka@suse.cz> <20200427183913.GH11244@42.do-not-panic.com> <028d1996-9f4c-20c6-fb2a-706baa919dde@suse.cz> <20200511183155.GT11244@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > >> 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 > >> Signed-off-by: Vlastimil Babka > >> --- > >> 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