blob: 8f91fb051ef1822e8b71c0b6e6ef51cc04c103b1 [file] [log] [blame]
Jiri Olsa0a4e1ae2012-11-10 01:46:41 +01001#ifndef TESTS_H
2#define TESTS_H
3
Jiri Olsa450ac182013-06-07 15:37:03 +02004#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
Jiri Olsaf4c1ea52012-12-19 11:33:39 -030012enum {
13 TEST_OK = 0,
14 TEST_FAIL = -1,
15 TEST_SKIP = -2,
16};
17
Jiri Olsad3b59a32012-11-10 01:46:42 +010018/* Tests */
Jiri Olsa0a4e1ae2012-11-10 01:46:41 +010019int test__vmlinux_matches_kallsyms(void);
Jiri Olsad3b59a32012-11-10 01:46:42 +010020int test__open_syscall_event(void);
Jiri Olsabd905172012-11-10 01:46:43 +010021int test__open_syscall_event_on_all_cpus(void);
Jiri Olsaa65b9c62012-11-10 01:46:44 +010022int test__basic_mmap(void);
Jiri Olsa16d00fe2012-11-10 01:46:45 +010023int test__PERF_RECORD(void);
Jiri Olsabacf7e52012-11-10 01:46:46 +010024int test__rdpmc(void);
Jiri Olsacfffae22012-11-10 01:46:47 +010025int test__perf_evsel__roundtrip_name_test(void);
Jiri Olsa5e24a092012-11-10 01:46:48 +010026int test__perf_evsel__tp_sched_test(void);
Jiri Olsadc447ee2012-11-10 01:46:49 +010027int test__syscall_open_tp_fields(void);
Jiri Olsacff7f952012-11-10 01:46:50 +010028int test__pmu(void);
Jiri Olsac81251e2012-11-10 01:46:51 +010029int test__attr(void);
30int test__dso_data(void);
31int test__parse_events(void);
Namhyung Kimf8ebb0c2012-12-10 17:29:57 +090032int test__hists_link(void);
Arnaldo Carvalho de Melo54359d32012-12-14 13:06:13 -030033int test__python_use(void);
Jiri Olsa5a6bef42013-03-10 19:41:10 +010034int test__bp_signal(void);
Jiri Olsa06933e32013-03-10 19:41:11 +010035int test__bp_signal_overflow(void);
Namhyung Kimd723a552013-03-15 14:58:11 +090036int test__task_exit(void);
Namhyung Kimbc96b362013-03-18 11:41:47 +090037int test__sw_clock_freq(void);
Adrian Hunter3bd5a5f2013-06-28 16:22:19 +030038int test__perf_time_to_tsc(void);
Adrian Hunterb55ae0a2013-08-07 14:38:45 +030039int test__code_reading(void);
Adrian Hunter045f8cd82013-08-27 11:23:13 +030040int test__sample_parsing(void);
Adrian Hunter395c3072013-08-31 21:50:53 +030041int test__keep_tracking(void);
Adrian Hunter53a277e2013-09-04 23:18:16 +030042int test__parse_no_sample_id_all(void);
Jiri Olsaaa16b812014-01-07 13:47:22 +010043int test__dwarf_unwind(void);
Namhyung Kim3c3cfd92014-04-25 12:28:14 +090044int test__hists_filter(void);
Jiri Olsa4e85edf2014-03-05 17:20:31 +010045int test__mmap_thread_lookup(void);
Jiri Olsafabf012382014-03-17 14:39:00 +010046int test__thread_mg_share(void);
Jiri Olsad3b59a32012-11-10 01:46:42 +010047
Jean Pihet90fa9de2014-05-16 10:41:11 +020048#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
Jiri Olsa9ff125d2014-01-07 13:47:28 +010049#ifdef HAVE_DWARF_UNWIND_SUPPORT
Jiri Olsaaa16b812014-01-07 13:47:22 +010050struct thread;
51struct perf_sample;
52int test__arch_unwind_sample(struct perf_sample *sample,
53 struct thread *thread);
54#endif
55#endif
Jiri Olsa0a4e1ae2012-11-10 01:46:41 +010056#endif /* TESTS_H */