linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Jin Yao <yao.jin@linux.intel.com>,
	John Garry <john.garry@huawei.com>,
	"Paul A . Clarke" <pc@us.ibm.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Brendan Higgins <brendanhiggins@google.com>,
	Daniel Latypov <dlatypov@google.com>,
	David Gow <davidgow@google.com>,
	eranian@google.com
Subject: Re: [PATCH v2 21/22] perf test: Remove is_supported function
Date: Wed, 20 Oct 2021 15:06:28 +0200	[thread overview]
Message-ID: <YXAUVJgFqcxYoiaa@krava> (raw)
In-Reply-To: <20211013174604.747276-22-irogers@google.com>

On Wed, Oct 13, 2021 at 10:46:03AM -0700, Ian Rogers wrote:
> All tests now return TEST_SKIP if not supported. Removing this function
> brings perf's test_suite struct more inline with kunit.

ah ok, forget my previous comment then ;-)

jirka

> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/tests/builtin-test.c | 14 +-------------
>  tools/perf/tests/tests.h        |  1 -
>  2 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 966948cacba3..086641f60015 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -150,11 +150,6 @@ static const char *test_description(const struct test_suite *t, int subtest)
>  	return t->desc;
>  }
>  
> -static bool is_supported(const struct test_suite *t)
> -{
> -	return !t->is_supported || t->is_supported();
> -}
> -
>  static test_fnptr test_function(const struct test_suite *t, int subtest)
>  {
>  	if (subtest <= 0)
> @@ -480,12 +475,6 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist)
>  				continue;
>  		}
>  
> -		if (!is_supported(t)) {
> -			pr_debug("%2d: %-*s: Disabled\n", i, width,
> -				 test_description(t, -1));
> -			continue;
> -		}
> -
>  		pr_info("%2d: %-*s:", i, width, test_description(t, -1));
>  
>  		if (intlist__find(skiplist, i)) {
> @@ -583,8 +572,7 @@ static int perf_test__list(int argc, const char **argv)
>  	for_each_test(j, k, t) {
>  		int curr = i++;
>  
> -		if (!perf_test__matches(test_description(t, -1), curr, argc, argv) ||
> -		    !is_supported(t))
> +		if (!perf_test__matches(test_description(t, -1), curr, argc, argv))
>  			continue;
>  
>  		pr_info("%2d: %s\n", i, test_description(t, -1));
> diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
> index 958f94dcc94c..15051801c790 100644
> --- a/tools/perf/tests/tests.h
> +++ b/tools/perf/tests/tests.h
> @@ -44,7 +44,6 @@ struct test_suite {
>  		bool skip_if_fail;
>  	} subtest;
>  	struct test_case *test_cases;
> -	bool (*is_supported)(void);
>  	void *priv;
>  };
>  
> -- 
> 2.33.0.882.g93a45727a2-goog
> 


  reply	other threads:[~2021-10-20 13:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 17:45 [PATCH v2 00/22] Start aligning perf test with kunit style Ian Rogers
2021-10-13 17:45 ` [PATCH v2 01/22] perf test: Use macro for "suite" declarations Ian Rogers
2021-10-13 17:45 ` [PATCH v2 02/22] perf test: Use macro for "suite" definitions Ian Rogers
2021-10-13 17:45 ` [PATCH v2 03/22] perf test: Make each test/suite its own struct Ian Rogers
2021-10-13 17:45 ` [PATCH v2 04/22] perf test: Move each test suite struct to its test Ian Rogers
2021-10-13 17:45 ` [PATCH v2 05/22] perf test: Rename struct test to test_suite Ian Rogers
2021-10-13 17:45 ` [PATCH v2 06/22] perf test: Add helper functions for abstraction Ian Rogers
2021-10-20 12:34   ` Jiri Olsa
2021-10-25 22:35     ` Ian Rogers
2021-10-13 17:45 ` [PATCH v2 07/22] perf test: Add test case struct Ian Rogers
2021-10-13 17:45 ` [PATCH v2 08/22] perf test: Add skip reason to test case Ian Rogers
2021-10-13 17:45 ` [PATCH v2 09/22] perf test: Convert pfm tests to use test cases Ian Rogers
2021-10-13 17:45 ` [PATCH v2 10/22] perf test: Convert pmu event tests to " Ian Rogers
2021-10-13 17:45 ` [PATCH v2 11/22] perf test: Convert watch point " Ian Rogers
2021-10-20 12:45   ` Jiri Olsa
2021-11-13 21:11   ` Arnaldo Carvalho de Melo
2021-10-13 17:45 ` [PATCH v2 12/22] perf test: Convert clang " Ian Rogers
2021-10-13 17:45 ` [PATCH v2 13/22] perf test: Convert bpf " Ian Rogers
2021-10-13 17:45 ` [PATCH v2 14/22] perf test: Convert llvm " Ian Rogers
2021-10-13 17:45 ` [PATCH v2 15/22] perf test: Remove now unused subtest helpers Ian Rogers
2021-10-13 17:45 ` [PATCH v2 16/22] perf test: bp tests use test case Ian Rogers
2021-10-13 17:45 ` [PATCH v2 17/22] perf test: Convert time to tsc test to " Ian Rogers
2021-10-13 17:46 ` [PATCH v2 18/22] perf test: Remove non test case style support Ian Rogers
2021-10-13 17:46 ` [PATCH v2 19/22] perf test: BP tests, remove is_supported use Ian Rogers
2021-10-13 17:46 ` [PATCH v2 20/22] perf test: TSC test, " Ian Rogers
2021-10-13 17:46 ` [PATCH v2 21/22] perf test: Remove is_supported function Ian Rogers
2021-10-20 13:06   ` Jiri Olsa [this message]
2021-10-13 17:46 ` [PATCH v2 22/22] perf test: Remove skip_if_fail Ian Rogers
2021-10-20 12:14 ` [PATCH v2 00/22] Start aligning perf test with kunit style Jiri Olsa
2021-10-20 15:51   ` Ian Rogers
2021-10-28 23:52     ` Ian Rogers
2021-10-29 12:19       ` Jiri Olsa
2021-11-03 19:15         ` Ian Rogers

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=YXAUVJgFqcxYoiaa@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pc@us.ibm.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@linux.intel.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).