From 9be56d30802f6da22c7afe7e70a77a3bdda6561b Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 3 Nov 2021 23:41:54 -0700 Subject: perf test: Add skip reason to test case. This doesn't exist in kunit, but will ease the transition from perf tests. Signed-off-by: Ian Rogers Tested-by: Sohaib Mohamed Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Brendan Higgins Cc: Daniel Latypov Cc: David Gow Cc: Ingo Molnar Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20211104064208.3156807-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/builtin-test.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/tests/builtin-test.c') diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index a6d84feba483..db76d7d10749 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -142,6 +142,9 @@ static const char *skip_reason(const struct test_suite *t, int subtest) if (t->subtest.skip_reason) return t->subtest.skip_reason(subtest); + if (t->test_cases && subtest >= 0) + return t->test_cases[subtest].skip_reason; + return NULL; } -- cgit v1.2.3