Skip to content

Commit 848ddf5

Browse files
captain5050acmel
authored andcommitted
perf test: Remove is_supported function
All tests now return TEST_SKIP if not supported. Removing this function brings perf's test_suite struct more inline with kunit. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Sohaib Mohamed <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Brendan Higgins <[email protected]> Cc: Daniel Latypov <[email protected]> Cc: David Gow <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jin Yao <[email protected]> Cc: John Garry <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent e74dd9c commit 848ddf5

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

tools/perf/tests/builtin-test.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ static const char *test_description(const struct test_suite *t, int subtest)
150150
return t->desc;
151151
}
152152

153-
static bool is_supported(const struct test_suite *t)
154-
{
155-
return !t->is_supported || t->is_supported();
156-
}
157-
158153
static test_fnptr test_function(const struct test_suite *t, int subtest)
159154
{
160155
if (subtest <= 0)
@@ -480,12 +475,6 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist)
480475
continue;
481476
}
482477

483-
if (!is_supported(t)) {
484-
pr_debug("%2d: %-*s: Disabled\n", i, width,
485-
test_description(t, -1));
486-
continue;
487-
}
488-
489478
pr_info("%2d: %-*s:", i, width, test_description(t, -1));
490479

491480
if (intlist__find(skiplist, i)) {
@@ -583,8 +572,7 @@ static int perf_test__list(int argc, const char **argv)
583572
for_each_test(j, k, t) {
584573
int curr = i++;
585574

586-
if (!perf_test__matches(test_description(t, -1), curr, argc, argv) ||
587-
!is_supported(t))
575+
if (!perf_test__matches(test_description(t, -1), curr, argc, argv))
588576
continue;
589577

590578
pr_info("%2d: %s\n", i, test_description(t, -1));

tools/perf/tests/tests.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ struct test_suite {
4444
bool skip_if_fail;
4545
} subtest;
4646
struct test_case *test_cases;
47-
bool (*is_supported)(void);
4847
void *priv;
4948
};
5049

0 commit comments

Comments
 (0)