aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/tests.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2021-11-03 23:41:52 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-11-13 10:32:26 -0300
commitf832044c8e8a92ab418bf11d10b18e7ffe024190 (patch)
treec78cf2c410373ea0da6c6549bd2e806b9667a6ae /tools/perf/tests/tests.h
parentperf test: Rename struct test to test_suite (diff)
downloadlinux-dev-f832044c8e8a92ab418bf11d10b18e7ffe024190.tar.xz
linux-dev-f832044c8e8a92ab418bf11d10b18e7ffe024190.zip
perf test: Add helper functions for abstraction.
Abstract certain test features so that they can be refactored in later changes. No functional change. 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-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/tests.h')
-rw-r--r--tools/perf/tests/tests.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index c95b0de9f822..5139e24973cc 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -27,9 +27,13 @@ enum {
TEST_SKIP = -2,
};
+struct test_suite;
+
+typedef int (*test_fnptr)(struct test_suite *, int);
+
struct test_suite {
const char *desc;
- int (*func)(struct test_suite *test, int subtest);
+ test_fnptr func;
struct {
bool skip_if_fail;
int (*get_nr)(void);