mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 19:12:29 -04:00
perf test: Make each test/suite its own struct.
By switching to an array of pointers to tests (later to be suites) the definition of the tests can be moved to the file containing the tests. Committer notes: It's "&vectors_page", not "&vectors_pages", noticed when cross building to 32-bit ARM. Also the DEFINE_SUITE(vectors_page) should be done where its function is implemented, in tools/perf/arch/arm/tests/vectors-page.c, so that we can make it static, as we don't have anymore its declaration in tests.h. 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-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
54df5c8e01
commit
df2252054e
@@ -43,6 +43,12 @@ struct test {
|
||||
#define DECLARE_SUITE(name) \
|
||||
int test__##name(struct test *test, int subtest)
|
||||
|
||||
#define DEFINE_SUITE(description, name) \
|
||||
static struct test name = { \
|
||||
.desc = description, \
|
||||
.func = test__##name, \
|
||||
}
|
||||
|
||||
/* Tests */
|
||||
DECLARE_SUITE(vmlinux_matches_kallsyms);
|
||||
DECLARE_SUITE(openat_syscall_event);
|
||||
@@ -78,7 +84,7 @@ DECLARE_SUITE(code_reading);
|
||||
DECLARE_SUITE(sample_parsing);
|
||||
DECLARE_SUITE(keep_tracking);
|
||||
DECLARE_SUITE(parse_no_sample_id_all);
|
||||
DECLARE_SUITE(dwarf_unwind);
|
||||
extern struct test dwarf_unwind;
|
||||
DECLARE_SUITE(expr);
|
||||
DECLARE_SUITE(hists_filter);
|
||||
DECLARE_SUITE(mmap_thread_lookup);
|
||||
|
||||
Reference in New Issue
Block a user