Jiri Olsa | 0a4e1ae | 2012-11-10 01:46:41 +0100 | [diff] [blame] | 1 | #ifndef TESTS_H |
| 2 | #define TESTS_H |
| 3 | |
Jiri Olsa | 450ac18 | 2013-06-07 15:37:03 +0200 | [diff] [blame] | 4 | #define TEST_ASSERT_VAL(text, cond) \ |
| 5 | do { \ |
| 6 | if (!(cond)) { \ |
| 7 | pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \ |
| 8 | return -1; \ |
| 9 | } \ |
| 10 | } while (0) |
| 11 | |
Jiri Olsa | f4c1ea5 | 2012-12-19 11:33:39 -0300 | [diff] [blame] | 12 | enum { |
| 13 | TEST_OK = 0, |
| 14 | TEST_FAIL = -1, |
| 15 | TEST_SKIP = -2, |
| 16 | }; |
| 17 | |
Jiri Olsa | d3b59a3 | 2012-11-10 01:46:42 +0100 | [diff] [blame] | 18 | /* Tests */ |
Jiri Olsa | 0a4e1ae | 2012-11-10 01:46:41 +0100 | [diff] [blame] | 19 | int test__vmlinux_matches_kallsyms(void); |
Jiri Olsa | d3b59a3 | 2012-11-10 01:46:42 +0100 | [diff] [blame] | 20 | int test__open_syscall_event(void); |
Jiri Olsa | bd90517 | 2012-11-10 01:46:43 +0100 | [diff] [blame] | 21 | int test__open_syscall_event_on_all_cpus(void); |
Jiri Olsa | a65b9c6 | 2012-11-10 01:46:44 +0100 | [diff] [blame] | 22 | int test__basic_mmap(void); |
Jiri Olsa | 16d00fe | 2012-11-10 01:46:45 +0100 | [diff] [blame] | 23 | int test__PERF_RECORD(void); |
Jiri Olsa | bacf7e5 | 2012-11-10 01:46:46 +0100 | [diff] [blame] | 24 | int test__rdpmc(void); |
Jiri Olsa | cfffae2 | 2012-11-10 01:46:47 +0100 | [diff] [blame] | 25 | int test__perf_evsel__roundtrip_name_test(void); |
Jiri Olsa | 5e24a09 | 2012-11-10 01:46:48 +0100 | [diff] [blame] | 26 | int test__perf_evsel__tp_sched_test(void); |
Jiri Olsa | dc447ee | 2012-11-10 01:46:49 +0100 | [diff] [blame] | 27 | int test__syscall_open_tp_fields(void); |
Jiri Olsa | cff7f95 | 2012-11-10 01:46:50 +0100 | [diff] [blame] | 28 | int test__pmu(void); |
Jiri Olsa | c81251e | 2012-11-10 01:46:51 +0100 | [diff] [blame] | 29 | int test__attr(void); |
| 30 | int test__dso_data(void); |
| 31 | int test__parse_events(void); |
Namhyung Kim | f8ebb0c | 2012-12-10 17:29:57 +0900 | [diff] [blame] | 32 | int test__hists_link(void); |
Arnaldo Carvalho de Melo | 54359d3 | 2012-12-14 13:06:13 -0300 | [diff] [blame] | 33 | int test__python_use(void); |
Jiri Olsa | 5a6bef4 | 2013-03-10 19:41:10 +0100 | [diff] [blame] | 34 | int test__bp_signal(void); |
Jiri Olsa | 06933e3 | 2013-03-10 19:41:11 +0100 | [diff] [blame] | 35 | int test__bp_signal_overflow(void); |
Namhyung Kim | d723a55 | 2013-03-15 14:58:11 +0900 | [diff] [blame] | 36 | int test__task_exit(void); |
Namhyung Kim | bc96b36 | 2013-03-18 11:41:47 +0900 | [diff] [blame] | 37 | int test__sw_clock_freq(void); |
Adrian Hunter | 3bd5a5f | 2013-06-28 16:22:19 +0300 | [diff] [blame] | 38 | int test__perf_time_to_tsc(void); |
Adrian Hunter | b55ae0a | 2013-08-07 14:38:45 +0300 | [diff] [blame] | 39 | int test__code_reading(void); |
Adrian Hunter | 045f8cd8 | 2013-08-27 11:23:13 +0300 | [diff] [blame] | 40 | int test__sample_parsing(void); |
Adrian Hunter | 395c307 | 2013-08-31 21:50:53 +0300 | [diff] [blame] | 41 | int test__keep_tracking(void); |
Adrian Hunter | 53a277e | 2013-09-04 23:18:16 +0300 | [diff] [blame] | 42 | int test__parse_no_sample_id_all(void); |
Jiri Olsa | aa16b81 | 2014-01-07 13:47:22 +0100 | [diff] [blame] | 43 | int test__dwarf_unwind(void); |
Namhyung Kim | 3c3cfd9 | 2014-04-25 12:28:14 +0900 | [diff] [blame] | 44 | int test__hists_filter(void); |
Jiri Olsa | 4e85edf | 2014-03-05 17:20:31 +0100 | [diff] [blame] | 45 | int test__mmap_thread_lookup(void); |
Jiri Olsa | fabf01238 | 2014-03-17 14:39:00 +0100 | [diff] [blame] | 46 | int test__thread_mg_share(void); |
Jiri Olsa | d3b59a3 | 2012-11-10 01:46:42 +0100 | [diff] [blame] | 47 | |
Jean Pihet | 90fa9de | 2014-05-16 10:41:11 +0200 | [diff] [blame] | 48 | #if defined(__x86_64__) || defined(__i386__) || defined(__arm__) |
Jiri Olsa | 9ff125d | 2014-01-07 13:47:28 +0100 | [diff] [blame] | 49 | #ifdef HAVE_DWARF_UNWIND_SUPPORT |
Jiri Olsa | aa16b81 | 2014-01-07 13:47:22 +0100 | [diff] [blame] | 50 | struct thread; |
| 51 | struct perf_sample; |
| 52 | int test__arch_unwind_sample(struct perf_sample *sample, |
| 53 | struct thread *thread); |
| 54 | #endif |
| 55 | #endif |
Jiri Olsa | 0a4e1ae | 2012-11-10 01:46:41 +0100 | [diff] [blame] | 56 | #endif /* TESTS_H */ |