tests.h 1.6 KB
Newer Older
1 2 3
#ifndef TESTS_H
#define TESTS_H

4 5 6 7 8 9 10 11
#define TEST_ASSERT_VAL(text, cond)					 \
do {									 \
	if (!(cond)) {							 \
		pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
		return -1;						 \
	}								 \
} while (0)

12 13 14 15 16 17
enum {
	TEST_OK   =  0,
	TEST_FAIL = -1,
	TEST_SKIP = -2,
};

18
/* Tests */
19
int test__vmlinux_matches_kallsyms(void);
20
int test__open_syscall_event(void);
21
int test__open_syscall_event_on_all_cpus(void);
22
int test__basic_mmap(void);
23
int test__PERF_RECORD(void);
24
int test__rdpmc(void);
25
int test__perf_evsel__roundtrip_name_test(void);
26
int test__perf_evsel__tp_sched_test(void);
27
int test__syscall_open_tp_fields(void);
28
int test__pmu(void);
29 30
int test__attr(void);
int test__dso_data(void);
31
int test__dso_data_cache(void);
32
int test__dso_data_reopen(void);
33
int test__parse_events(void);
34
int test__hists_link(void);
35
int test__python_use(void);
36
int test__bp_signal(void);
37
int test__bp_signal_overflow(void);
38
int test__task_exit(void);
39
int test__sw_clock_freq(void);
40
int test__perf_time_to_tsc(void);
41
int test__code_reading(void);
42
int test__sample_parsing(void);
43
int test__keep_tracking(void);
44
int test__parse_no_sample_id_all(void);
45
int test__dwarf_unwind(void);
46
int test__hists_filter(void);
47
int test__mmap_thread_lookup(void);
48
int test__thread_mg_share(void);
49
int test__hists_output(void);
50
int test__hists_cumulate(void);
51
int test__switch_tracking(void);
52
int test__perf_evlist__filter_pollfd(void);
53

54
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
55
#ifdef HAVE_DWARF_UNWIND_SUPPORT
56 57 58 59 60 61
struct thread;
struct perf_sample;
int test__arch_unwind_sample(struct perf_sample *sample,
			     struct thread *thread);
#endif
#endif
62
#endif /* TESTS_H */