[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211104064208.3156807-16-irogers@google.com>
Date: Wed, 3 Nov 2021 23:42:01 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Jin Yao <yao.jin@...ux.intel.com>,
John Garry <john.garry@...wei.com>,
"Paul A . Clarke" <pc@...ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Brendan Higgins <brendanhiggins@...gle.com>,
Daniel Latypov <dlatypov@...gle.com>,
David Gow <davidgow@...gle.com>,
Sohaib Mohamed <sohaib.amhmd@...il.com>
Cc: eranian@...gle.com, Ian Rogers <irogers@...gle.com>
Subject: [PATCH v3 15/22] perf test: Remove now unused subtest helpers
Replaced by null terminated test case array.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/tests/builtin-test.c | 11 +----------
tools/perf/tests/tests.h | 3 ---
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index db76d7d10749..62e97faa90f0 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -119,9 +119,6 @@ static int num_subtests(const struct test_suite *t)
{
int num;
- if (t->subtest.get_nr)
- return t->subtest.get_nr();
-
if (!t->test_cases)
return 0;
@@ -134,14 +131,11 @@ static int num_subtests(const struct test_suite *t)
static bool has_subtests(const struct test_suite *t)
{
- return t->subtest.get_nr || num_subtests(t) > 1;
+ return num_subtests(t) > 1;
}
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;
@@ -153,9 +147,6 @@ static const char *test_description(const struct test_suite *t, int subtest)
if (t->test_cases && subtest >= 0)
return t->test_cases[subtest].desc;
- if (t->subtest.get_desc && subtest >= 0)
- return t->subtest.get_desc(subtest);
-
return t->desc;
}
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index f87129b63d92..9bf448f7429a 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -43,9 +43,6 @@ struct test_suite {
test_fnptr func;
struct {
bool skip_if_fail;
- int (*get_nr)(void);
- const char *(*get_desc)(int subtest);
- const char *(*skip_reason)(int subtest);
} subtest;
struct test_case *test_cases;
bool (*is_supported)(void);
--
2.33.1.1089.g2158813163f-goog
Powered by blists - more mailing lists