Commit 94e11fc7 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo

perf test: Remove now unused subtest helpers

Replaced by null terminated test case array.
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Tested-by: default avatarSohaib Mohamed <sohaib.amhmd@gmail.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Daniel Latypov <dlatypov@google.com>
Cc: David Gow <davidgow@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20211104064208.3156807-16-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e65bc1fa
...@@ -119,9 +119,6 @@ static int num_subtests(const struct test_suite *t) ...@@ -119,9 +119,6 @@ static int num_subtests(const struct test_suite *t)
{ {
int num; int num;
if (t->subtest.get_nr)
return t->subtest.get_nr();
if (!t->test_cases) if (!t->test_cases)
return 0; return 0;
...@@ -134,14 +131,11 @@ static int num_subtests(const struct test_suite *t) ...@@ -134,14 +131,11 @@ static int num_subtests(const struct test_suite *t)
static bool has_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) 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) if (t->test_cases && subtest >= 0)
return t->test_cases[subtest].skip_reason; return t->test_cases[subtest].skip_reason;
...@@ -153,9 +147,6 @@ static const char *test_description(const struct test_suite *t, int subtest) ...@@ -153,9 +147,6 @@ static const char *test_description(const struct test_suite *t, int subtest)
if (t->test_cases && subtest >= 0) if (t->test_cases && subtest >= 0)
return t->test_cases[subtest].desc; return t->test_cases[subtest].desc;
if (t->subtest.get_desc && subtest >= 0)
return t->subtest.get_desc(subtest);
return t->desc; return t->desc;
} }
......
...@@ -43,9 +43,6 @@ struct test_suite { ...@@ -43,9 +43,6 @@ struct test_suite {
test_fnptr func; test_fnptr func;
struct { struct {
bool skip_if_fail; bool skip_if_fail;
int (*get_nr)(void);
const char *(*get_desc)(int subtest);
const char *(*skip_reason)(int subtest);
} subtest; } subtest;
struct test_case *test_cases; struct test_case *test_cases;
bool (*is_supported)(void); bool (*is_supported)(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment