Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4691645pxt; Wed, 11 Aug 2021 11:42:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhj94R6ams/6wsvIzUEqciW11XwEWvp2rYToLWv0twGaUI3/xy8ZNOBZP0Yd042Vi9QYt4 X-Received: by 2002:a17:906:7246:: with SMTP id n6mr4961000ejk.94.1628707377355; Wed, 11 Aug 2021 11:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628707377; cv=none; d=google.com; s=arc-20160816; b=HmCSLDXYn4IUyQIjI2vmwQ5VkBqDLtOxLZCieA0ZCziwdkm+hT878FTzMHaV0Noiln OqSqMQQXrSePIzoH/FctWt8BDUORqRqirYN/RpKbQ9zkvI2bAVIbPdLoydoDhy9UVRF+ 6aSXl0ssYUVARjbDpYU4/bjSDm2RbfbAXf/ig74kt5iWYXowL0T2IYmNIsuxDhtSJouB B1TG1LVlMcCWYHVTNqUmS1G+EzAc+3j7F23rW/L2CV/ttOO2lcrvzlP2Uk+Gd70Rwxta KQ/SL/yoTUTyRvIrzYBuNNi1YtI34bT3/p+9ObVA8GgGz0Ji+SvvDBl7a0Pft2Q/DaYI PtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mk5fC8xxbmnX+1j65RtzCQQnUuN9t1K19r/8RoTiWu0=; b=xJhRngJSo9Vmh4f9nykipNEw8v+kMiKKk45bjLrDhq8mGs/0zMNlhCVQQfhogA23+3 sksfmVBEmCVfHdGfTL9r9MKYHinzsHRWxfJIm7lXXEWDAXcCTBwhDDpXQtkUfIFqDekr Rk+DDZK5ImxSBHpmWnxwTohCWM29SmEEWoXQbiwnVNFo+7pqKPbUAjf9N4N45rtXHBR2 A3Cmds0BMtOnenHDW2+m0PTWbPW3kTal3fHEJ/g8QOwICvPDoEBF2Nkz5OmncCK+RbVh ylHVSniE8U5JxDRokp43BCo8B57sSRiwhTKOgZOjKfkfZj7swIps3rbWpQQWYVSizM4P h6Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qwETC8if; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp2si9324035ejb.76.2021.08.11.11.42.32; Wed, 11 Aug 2021 11:42:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qwETC8if; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbhHKSlI (ORCPT + 99 others); Wed, 11 Aug 2021 14:41:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:56092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhHKSlH (ORCPT ); Wed, 11 Aug 2021 14:41:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8874A6104F; Wed, 11 Aug 2021 18:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628707243; bh=6FBya3zd7+WtAeRn1jjfYTE4KY3Ha+15NLGh2e389sI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qwETC8ifPyPMBBlkwetsJmwmCnctosRPgsVEt1NST5M3HpQQrseFW/52NQBIvMhOw OEGPaB5r5KBU9m2o7WSvamA1NJ3er7lC7SBDa+cpvq7l7ZEV3+qRZ3uuNnFodh8lDU R1LG1eUcwAjtkjKXIbQEuDad0zLGZftfBPbiDmyoKzq2q0Th/l4qKd7zO4vbC8L7q0 yzbj/1iWIXc/YdfLcOqGtoC2KX6BHnTUn0OppGbYiX4Ywha3ZbUPpFldALOmRVYr23 4Pjr10G/MsClNEk4fdtbsEVHEIlUEGOB5oEbIZaMu6PKSUaQyesCg7igDFj7oxZHZV ZF0a9cdVQ7syg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A5696403F2; Wed, 11 Aug 2021 15:40:40 -0300 (-03) Date: Wed, 11 Aug 2021 15:40:40 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf test: make --skip work on shell tests Message-ID: References: <20210811180625.160944-1-rickyman7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210811180625.160944-1-rickyman7@gmail.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Aug 11, 2021 at 08:06:26PM +0200, Riccardo Mancini escreveu: > perf-test has the option --skip to provide a list of tests to skip. > However, this option does not work with shell scripts. > > This patch passes the skiplist to run_shell_tests, so that also shell > scripts could be skipped using --skip. In such cases please provide an example of the usage you're fixing, what was it that you tried that didn't work and that now works? Its obviously a fix, so I'm applying it. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/tests/builtin-test.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c > index 5e6242576236325c..fb4a75cc8fa9530e 100644 > --- a/tools/perf/tests/builtin-test.c > +++ b/tools/perf/tests/builtin-test.c > @@ -594,7 +594,8 @@ static int shell_test__run(struct test *test, int subdir __maybe_unused) > return WEXITSTATUS(err) == 2 ? TEST_SKIP : TEST_FAIL; > } > > -static int run_shell_tests(int argc, const char *argv[], int i, int width) > +static int run_shell_tests(int argc, const char *argv[], int i, int width, > + struct intlist *skiplist) > { > struct dirent **entlist; > struct dirent *ent; > @@ -628,6 +629,12 @@ static int run_shell_tests(int argc, const char *argv[], int i, int width) > > st.file = ent->d_name; > pr_info("%2d: %-*s:", i, width, test.desc); > + > + if (intlist__find(skiplist, i)) { > + color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip (user override)\n"); > + continue; > + } > + > test_and_print(&test, false, -1); > } > > @@ -727,7 +734,7 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist) > } > } > > - return run_shell_tests(argc, argv, i, width); > + return run_shell_tests(argc, argv, i, width, skiplist); > } > > static int perf_test__list_shell(int argc, const char **argv, int i) > -- > 2.31.1 > -- - Arnaldo