2012-11-10 01:46:41 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifndef TESTS_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define TESTS_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-07 15:37:03 +02: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 11:33:39 -03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								enum {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TEST_OK   =  0,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TEST_FAIL = -1,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TEST_SKIP = -2,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:42 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/* Tests */
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:41 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								int test__vmlinux_matches_kallsyms(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:42 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__open_syscall_event(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__open_syscall_event_on_all_cpus(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__basic_mmap(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__PERF_RECORD(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__rdpmc(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__perf_evsel__roundtrip_name_test(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__perf_evsel__tp_sched_test(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__syscall_open_tp_fields(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__pmu(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:51 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__attr(void);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								int test__dso_data(void);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								int test__parse_events(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-12-10 17:29:57 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__hists_link(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-12-14 13:06:13 -03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__python_use(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-03-10 19:41:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__bp_signal(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-03-10 19:41:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__bp_signal_overflow(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-03-15 14:58:11 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__task_exit(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-03-18 11:41:47 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__sw_clock_freq(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-28 16:22:19 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__perf_time_to_tsc(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-08-07 14:38:45 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__code_reading(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-08-27 11:23:13 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__sample_parsing(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-08-31 21:50:53 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__keep_tracking(void);
							 | 
						
					
						
							
								
									
										
										
										
											2013-09-04 23:18:16 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__parse_no_sample_id_all(void);
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-07 13:47:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int test__dwarf_unwind(void);
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:42 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-07 13:47:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#if defined(__x86_64__) || defined(__i386__)
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-07 13:47:28 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef HAVE_DWARF_UNWIND_SUPPORT
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-07 13:47:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								struct thread;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								struct perf_sample;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								int test__arch_unwind_sample(struct perf_sample *sample,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											     struct thread *thread);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-11-10 01:46:41 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif /* TESTS_H */
							 |