]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf test: Remove is_supported function
authorIan Rogers <irogers@google.com>
Thu, 4 Nov 2021 06:42:07 +0000 (23:42 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 13 Nov 2021 21:11:50 +0000 (18:11 -0300)
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 <irogers@google.com>
Tested-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Acked-by: Jiri 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-22-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c
tools/perf/tests/tests.h

index 1d9c0e03b8dbcc1c93a4c78249cec71957838f81..19b1228dbd5d56c00ad3304fd7e448d331735493 100644 (file)
@@ -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));
index 958f94dcc94c956bf777a7d24d55b5a8b3750132..15051801c790139515bf4909928704aef5eab6bd 100644 (file)
@@ -44,7 +44,6 @@ struct test_suite {
                bool skip_if_fail;
        } subtest;
        struct test_case *test_cases;
-       bool (*is_supported)(void);
        void *priv;
 };