mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
Some tests have sub-tests we want to run, so allow passing this.
Wang tried to avoid having to touch all tests, but then, having the
test.func in an anonymous union makes the build fail on older compilers,
like the one in RHEL6, where:
test a = {
.func = foo,
};
fails.
To fix it leave the func pointer in the main structure and pass the subtest
index to all tests, end result function is the same, but we have just one
function pointer, not two, with and without the subtest index as an argument.
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
20 lines
418 B
C
20 lines
418 B
C
#ifndef ARCH_TESTS_H
|
|
#define ARCH_TESTS_H
|
|
|
|
/* Tests */
|
|
int test__rdpmc(int subtest);
|
|
int test__perf_time_to_tsc(int subtest);
|
|
int test__insn_x86(int subtest);
|
|
int test__intel_cqm_count_nmi_context(int subtest);
|
|
|
|
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
|
struct thread;
|
|
struct perf_sample;
|
|
int test__arch_unwind_sample(struct perf_sample *sample,
|
|
struct thread *thread);
|
|
#endif
|
|
|
|
extern struct test arch_tests[];
|
|
|
|
#endif
|