builtin-test.c (cff7f956ec4a1ede9b752cfae3c12f588292ad80) | builtin-test.c (c81251e808fe2386e71990ecd49c408bb7cb4666) |
---|---|
1/* 2 * builtin-test.c 3 * 4 * Builtin regression testing command: ever growing number of sanity tests 5 */ 6#include "builtin.h" | 1/* 2 * builtin-test.c 3 * 4 * Builtin regression testing command: ever growing number of sanity tests 5 */ 6#include "builtin.h" |
7 8#include "util/cache.h" 9#include "util/color.h" 10#include "util/debug.h" 11#include "util/debugfs.h" 12#include "util/evlist.h" 13#include "util/machine.h" 14#include "util/parse-options.h" 15#include "util/parse-events.h" 16#include "util/symbol.h" 17#include "util/thread_map.h" 18#include "util/pmu.h" 19#include "event-parse.h" 20#include "../../include/linux/hw_breakpoint.h" 21 22#include <sys/mman.h> 23 24#include "util/cpumap.h" 25#include "util/evsel.h" 26#include <sys/types.h> 27 | |
28#include "tests.h" | 7#include "tests.h" |
8#include "debug.h" 9#include "color.h" 10#include "parse-options.h" 11#include "symbol.h" |
|
29 | 12 |
30#include <sched.h> 31 32 | |
33static struct test { 34 const char *desc; 35 int (*func)(void); 36} tests[] = { 37 { 38 .desc = "vmlinux symtab matches kallsyms", 39 .func = test__vmlinux_matches_kallsyms, 40 }, --- 6 unchanged lines hidden (view full) --- 47 .func = test__open_syscall_event_on_all_cpus, 48 }, 49 { 50 .desc = "read samples using the mmap interface", 51 .func = test__basic_mmap, 52 }, 53 { 54 .desc = "parse events tests", | 13static struct test { 14 const char *desc; 15 int (*func)(void); 16} tests[] = { 17 { 18 .desc = "vmlinux symtab matches kallsyms", 19 .func = test__vmlinux_matches_kallsyms, 20 }, --- 6 unchanged lines hidden (view full) --- 27 .func = test__open_syscall_event_on_all_cpus, 28 }, 29 { 30 .desc = "read samples using the mmap interface", 31 .func = test__basic_mmap, 32 }, 33 { 34 .desc = "parse events tests", |
55 .func = parse_events__test, | 35 .func = test__parse_events, |
56 }, 57#if defined(__x86_64__) || defined(__i386__) 58 { 59 .desc = "x86 rdpmc test", 60 .func = test__rdpmc, 61 }, 62#endif 63 { 64 .desc = "Validate PERF_RECORD_* events & perf_sample fields", 65 .func = test__PERF_RECORD, 66 }, 67 { 68 .desc = "Test perf pmu format parsing", 69 .func = test__pmu, 70 }, 71 { 72 .desc = "Test dso data interface", | 36 }, 37#if defined(__x86_64__) || defined(__i386__) 38 { 39 .desc = "x86 rdpmc test", 40 .func = test__rdpmc, 41 }, 42#endif 43 { 44 .desc = "Validate PERF_RECORD_* events & perf_sample fields", 45 .func = test__PERF_RECORD, 46 }, 47 { 48 .desc = "Test perf pmu format parsing", 49 .func = test__pmu, 50 }, 51 { 52 .desc = "Test dso data interface", |
73 .func = dso__test_data, | 53 .func = test__dso_data, |
74 }, 75 { 76 .desc = "roundtrip evsel->name check", 77 .func = test__perf_evsel__roundtrip_name_test, 78 }, 79 { 80 .desc = "Check parsing of sched tracepoints fields", 81 .func = test__perf_evsel__tp_sched_test, 82 }, 83 { 84 .desc = "Generate and check syscalls:sys_enter_open event fields", 85 .func = test__syscall_open_tp_fields, 86 }, 87 { 88 .desc = "struct perf_event_attr setup", | 54 }, 55 { 56 .desc = "roundtrip evsel->name check", 57 .func = test__perf_evsel__roundtrip_name_test, 58 }, 59 { 60 .desc = "Check parsing of sched tracepoints fields", 61 .func = test__perf_evsel__tp_sched_test, 62 }, 63 { 64 .desc = "Generate and check syscalls:sys_enter_open event fields", 65 .func = test__syscall_open_tp_fields, 66 }, 67 { 68 .desc = "struct perf_event_attr setup", |
89 .func = test_attr__run, | 69 .func = test__attr, |
90 }, 91 { 92 .func = NULL, 93 }, 94}; 95 96static bool perf_test__matches(int curr, int argc, const char *argv[]) 97{ --- 96 unchanged lines hidden --- | 70 }, 71 { 72 .func = NULL, 73 }, 74}; 75 76static bool perf_test__matches(int curr, int argc, const char *argv[]) 77{ --- 96 unchanged lines hidden --- |