perf tests: Add arch tests
[linux-2.6-block.git] / tools / perf / tests / tests.h
CommitLineData
0a4e1ae6
JO
1#ifndef TESTS_H
2#define TESTS_H
3
450ac18d
JO
4#define TEST_ASSERT_VAL(text, cond) \
5do { \
6 if (!(cond)) { \
7 pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
8 return -1; \
9 } \
10} while (0)
11
8f196013
ACM
12#define TEST_ASSERT_EQUAL(text, val, expected) \
13do { \
14 if (val != expected) { \
15 pr_debug("FAILED %s:%d %s (%d != %d)\n", \
16 __FILE__, __LINE__, text, val, expected); \
17 return -1; \
18 } \
19} while (0)
20
f4c1ea5f
JO
21enum {
22 TEST_OK = 0,
23 TEST_FAIL = -1,
24 TEST_SKIP = -2,
25};
26
31b6753f
MF
27struct test {
28 const char *desc;
29 int (*func)(void);
30};
31
d3b59a38 32/* Tests */
0a4e1ae6 33int test__vmlinux_matches_kallsyms(void);
43f322b4
RV
34int test__openat_syscall_event(void);
35int test__openat_syscall_event_on_all_cpus(void);
a65b9c62 36int test__basic_mmap(void);
16d00fee 37int test__PERF_RECORD(void);
bacf7e5d 38int test__rdpmc(void);
cfffae2e 39int test__perf_evsel__roundtrip_name_test(void);
5e24a090 40int test__perf_evsel__tp_sched_test(void);
43f322b4 41int test__syscall_openat_tp_fields(void);
cff7f956 42int test__pmu(void);
c81251e8
JO
43int test__attr(void);
44int test__dso_data(void);
4ebbcb84 45int test__dso_data_cache(void);
45dc1bb5 46int test__dso_data_reopen(void);
c81251e8 47int test__parse_events(void);
f8ebb0cd 48int test__hists_link(void);
54359d33 49int test__python_use(void);
5a6bef47 50int test__bp_signal(void);
06933e3a 51int test__bp_signal_overflow(void);
d723a550 52int test__task_exit(void);
bc96b361 53int test__sw_clock_freq(void);
3bd5a5fc 54int test__perf_time_to_tsc(void);
b55ae0a9 55int test__code_reading(void);
045f8cd8 56int test__sample_parsing(void);
395c3070 57int test__keep_tracking(void);
53a277e5 58int test__parse_no_sample_id_all(void);
aa16b81f 59int test__dwarf_unwind(void);
3c3cfd99 60int test__hists_filter(void);
4e85edfc 61int test__mmap_thread_lookup(void);
fabf0123 62int test__thread_mg_share(void);
f21d1815 63int test__hists_output(void);
0506aecc 64int test__hists_cumulate(void);
d44bc558 65int test__switch_tracking(void);
1b85337d
ACM
66int test__fdarray__filter(void);
67int test__fdarray__add(void);
3c8a67f5 68int test__kmod_path__parse(void);
134aa44f 69int test__thread_map(void);
9bc898c7 70int test__llvm(void);
98e4619f 71int test__insn_x86(void);
c84974ed 72int test_session_topology(void);
d3b59a38 73
3237f281 74#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
9ff125d1 75#ifdef HAVE_DWARF_UNWIND_SUPPORT
aa16b81f
JO
76struct thread;
77struct perf_sample;
78int test__arch_unwind_sample(struct perf_sample *sample,
79 struct thread *thread);
80#endif
81#endif
0a4e1ae6 82#endif /* TESTS_H */