2012-11-10 00:46:41 +00:00
|
|
|
#ifndef TESTS_H
|
|
|
|
#define TESTS_H
|
|
|
|
|
2013-06-07 13:37:03 +00:00
|
|
|
#define TEST_ASSERT_VAL(text, cond) \
|
|
|
|
do { \
|
|
|
|
if (!(cond)) { \
|
|
|
|
pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
|
|
|
|
return -1; \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2012-12-19 14:33:39 +00:00
|
|
|
enum {
|
|
|
|
TEST_OK = 0,
|
|
|
|
TEST_FAIL = -1,
|
|
|
|
TEST_SKIP = -2,
|
|
|
|
};
|
|
|
|
|
2012-11-10 00:46:42 +00:00
|
|
|
/* Tests */
|
2012-11-10 00:46:41 +00:00
|
|
|
int test__vmlinux_matches_kallsyms(void);
|
2012-11-10 00:46:42 +00:00
|
|
|
int test__open_syscall_event(void);
|
2012-11-10 00:46:43 +00:00
|
|
|
int test__open_syscall_event_on_all_cpus(void);
|
2012-11-10 00:46:44 +00:00
|
|
|
int test__basic_mmap(void);
|
2012-11-10 00:46:45 +00:00
|
|
|
int test__PERF_RECORD(void);
|
2012-11-10 00:46:46 +00:00
|
|
|
int test__rdpmc(void);
|
2012-11-10 00:46:47 +00:00
|
|
|
int test__perf_evsel__roundtrip_name_test(void);
|
2012-11-10 00:46:48 +00:00
|
|
|
int test__perf_evsel__tp_sched_test(void);
|
2012-11-10 00:46:49 +00:00
|
|
|
int test__syscall_open_tp_fields(void);
|
2012-11-10 00:46:50 +00:00
|
|
|
int test__pmu(void);
|
2012-11-10 00:46:51 +00:00
|
|
|
int test__attr(void);
|
|
|
|
int test__dso_data(void);
|
2014-05-12 12:43:53 +00:00
|
|
|
int test__dso_data_cache(void);
|
2014-05-12 12:50:03 +00:00
|
|
|
int test__dso_data_reopen(void);
|
2012-11-10 00:46:51 +00:00
|
|
|
int test__parse_events(void);
|
2012-12-10 08:29:57 +00:00
|
|
|
int test__hists_link(void);
|
2012-12-14 16:06:13 +00:00
|
|
|
int test__python_use(void);
|
2013-03-10 18:41:10 +00:00
|
|
|
int test__bp_signal(void);
|
2013-03-10 18:41:11 +00:00
|
|
|
int test__bp_signal_overflow(void);
|
2013-03-15 05:58:11 +00:00
|
|
|
int test__task_exit(void);
|
2013-03-18 02:41:47 +00:00
|
|
|
int test__sw_clock_freq(void);
|
2013-06-28 13:22:19 +00:00
|
|
|
int test__perf_time_to_tsc(void);
|
2013-08-07 11:38:45 +00:00
|
|
|
int test__code_reading(void);
|
2013-08-27 08:23:13 +00:00
|
|
|
int test__sample_parsing(void);
|
2013-08-31 18:50:53 +00:00
|
|
|
int test__keep_tracking(void);
|
2013-09-04 20:18:16 +00:00
|
|
|
int test__parse_no_sample_id_all(void);
|
2014-01-07 12:47:22 +00:00
|
|
|
int test__dwarf_unwind(void);
|
2014-04-25 03:28:14 +00:00
|
|
|
int test__hists_filter(void);
|
2014-03-05 16:20:31 +00:00
|
|
|
int test__mmap_thread_lookup(void);
|
2014-03-17 13:39:00 +00:00
|
|
|
int test__thread_mg_share(void);
|
2014-05-12 05:43:18 +00:00
|
|
|
int test__hists_output(void);
|
2014-05-23 09:04:42 +00:00
|
|
|
int test__hists_cumulate(void);
|
2014-08-15 19:08:36 +00:00
|
|
|
int test__switch_tracking(void);
|
2014-09-03 21:02:59 +00:00
|
|
|
int test__fdarray__filter(void);
|
|
|
|
int test__fdarray__add(void);
|
2012-11-10 00:46:42 +00:00
|
|
|
|
2014-05-16 08:41:11 +00:00
|
|
|
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
|
2014-01-07 12:47:28 +00:00
|
|
|
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
2014-01-07 12:47:22 +00:00
|
|
|
struct thread;
|
|
|
|
struct perf_sample;
|
|
|
|
int test__arch_unwind_sample(struct perf_sample *sample,
|
|
|
|
struct thread *thread);
|
|
|
|
#endif
|
|
|
|
#endif
|
2012-11-10 00:46:41 +00:00
|
|
|
#endif /* TESTS_H */
|