diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-11-09 19:46:51 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-14 14:50:24 -0500 |
commit | c81251e808fe2386e71990ecd49c408bb7cb4666 (patch) | |
tree | 0a7ccad48560b23d4205d06aa285cfdc8e5cefbc /tools/perf | |
parent | cff7f956ec4a1ede9b752cfae3c12f588292ad80 (diff) |
perf tests: Final cleanup for builtin-test move
Final function renames to match test__* style and include cleanup.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352508412-16914-12-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/perf.h | 1 | ||||
-rw-r--r-- | tools/perf/tests/attr.c | 3 | ||||
-rw-r--r-- | tools/perf/tests/builtin-test.c | 34 | ||||
-rw-r--r-- | tools/perf/tests/dso-data.c | 3 | ||||
-rw-r--r-- | tools/perf/tests/parse-events.c | 3 | ||||
-rw-r--r-- | tools/perf/tests/tests.h | 3 | ||||
-rw-r--r-- | tools/perf/util/parse-events.h | 1 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 1 |
8 files changed, 16 insertions, 33 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 054182e41dca..00472646b3bf 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -178,7 +178,6 @@ extern bool test_attr__enabled; | |||
178 | void test_attr__init(void); | 178 | void test_attr__init(void); |
179 | void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, | 179 | void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, |
180 | int fd, int group_fd, unsigned long flags); | 180 | int fd, int group_fd, unsigned long flags); |
181 | int test_attr__run(void); | ||
182 | 181 | ||
183 | static inline int | 182 | static inline int |
184 | sys_perf_event_open(struct perf_event_attr *attr, | 183 | sys_perf_event_open(struct perf_event_attr *attr, |
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 6e2feee8db2a..25638a986257 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "../perf.h" | 27 | #include "../perf.h" |
28 | #include "util.h" | 28 | #include "util.h" |
29 | #include "exec_cmd.h" | 29 | #include "exec_cmd.h" |
30 | #include "tests.h" | ||
30 | 31 | ||
31 | #define ENV "PERF_TEST_ATTR" | 32 | #define ENV "PERF_TEST_ATTR" |
32 | 33 | ||
@@ -151,7 +152,7 @@ static int run_dir(const char *d, const char *perf) | |||
151 | return system(cmd); | 152 | return system(cmd); |
152 | } | 153 | } |
153 | 154 | ||
154 | int test_attr__run(void) | 155 | int test__attr(void) |
155 | { | 156 | { |
156 | struct stat st; | 157 | struct stat st; |
157 | char path_perf[PATH_MAX]; | 158 | char path_perf[PATH_MAX]; |
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index d3b95e04b7a3..186f67535494 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -4,31 +4,11 @@ | |||
4 | * Builtin regression testing command: ever growing number of sanity tests | 4 | * Builtin regression testing command: ever growing number of sanity tests |
5 | */ | 5 | */ |
6 | #include "builtin.h" | 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" |
29 | 8 | #include "debug.h" | |
30 | #include <sched.h> | 9 | #include "color.h" |
31 | 10 | #include "parse-options.h" | |
11 | #include "symbol.h" | ||
32 | 12 | ||
33 | static struct test { | 13 | static struct test { |
34 | const char *desc; | 14 | const char *desc; |
@@ -52,7 +32,7 @@ static struct test { | |||
52 | }, | 32 | }, |
53 | { | 33 | { |
54 | .desc = "parse events tests", | 34 | .desc = "parse events tests", |
55 | .func = parse_events__test, | 35 | .func = test__parse_events, |
56 | }, | 36 | }, |
57 | #if defined(__x86_64__) || defined(__i386__) | 37 | #if defined(__x86_64__) || defined(__i386__) |
58 | { | 38 | { |
@@ -70,7 +50,7 @@ static struct test { | |||
70 | }, | 50 | }, |
71 | { | 51 | { |
72 | .desc = "Test dso data interface", | 52 | .desc = "Test dso data interface", |
73 | .func = dso__test_data, | 53 | .func = test__dso_data, |
74 | }, | 54 | }, |
75 | { | 55 | { |
76 | .desc = "roundtrip evsel->name check", | 56 | .desc = "roundtrip evsel->name check", |
@@ -86,7 +66,7 @@ static struct test { | |||
86 | }, | 66 | }, |
87 | { | 67 | { |
88 | .desc = "struct perf_event_attr setup", | 68 | .desc = "struct perf_event_attr setup", |
89 | .func = test_attr__run, | 69 | .func = test__attr, |
90 | }, | 70 | }, |
91 | { | 71 | { |
92 | .func = NULL, | 72 | .func = NULL, |
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index 0cd42fc9bc13..b5198f52c24a 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include "machine.h" | 9 | #include "machine.h" |
10 | #include "symbol.h" | 10 | #include "symbol.h" |
11 | #include "tests.h" | ||
11 | 12 | ||
12 | #define TEST_ASSERT_VAL(text, cond) \ | 13 | #define TEST_ASSERT_VAL(text, cond) \ |
13 | do { \ | 14 | do { \ |
@@ -95,7 +96,7 @@ struct test_data_offset offsets[] = { | |||
95 | }, | 96 | }, |
96 | }; | 97 | }; |
97 | 98 | ||
98 | int dso__test_data(void) | 99 | int test__dso_data(void) |
99 | { | 100 | { |
100 | struct machine machine; | 101 | struct machine machine; |
101 | struct dso *dso; | 102 | struct dso *dso; |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index b49c2eebff33..f2a82d0158c0 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include "evlist.h" | 4 | #include "evlist.h" |
5 | #include "sysfs.h" | 5 | #include "sysfs.h" |
6 | #include "../../../include/linux/hw_breakpoint.h" | 6 | #include "../../../include/linux/hw_breakpoint.h" |
7 | #include "tests.h" | ||
7 | 8 | ||
8 | #define TEST_ASSERT_VAL(text, cond) \ | 9 | #define TEST_ASSERT_VAL(text, cond) \ |
9 | do { \ | 10 | do { \ |
@@ -1086,7 +1087,7 @@ static int test_pmu_events(void) | |||
1086 | return ret; | 1087 | return ret; |
1087 | } | 1088 | } |
1088 | 1089 | ||
1089 | int parse_events__test(void) | 1090 | int test__parse_events(void) |
1090 | { | 1091 | { |
1091 | int ret1, ret2 = 0; | 1092 | int ret1, ret2 = 0; |
1092 | 1093 | ||
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 88a55dfa99d0..fc121edab016 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h | |||
@@ -12,6 +12,9 @@ int test__perf_evsel__roundtrip_name_test(void); | |||
12 | int test__perf_evsel__tp_sched_test(void); | 12 | int test__perf_evsel__tp_sched_test(void); |
13 | int test__syscall_open_tp_fields(void); | 13 | int test__syscall_open_tp_fields(void); |
14 | int test__pmu(void); | 14 | int test__pmu(void); |
15 | int test__attr(void); | ||
16 | int test__dso_data(void); | ||
17 | int test__parse_events(void); | ||
15 | 18 | ||
16 | /* Util */ | 19 | /* Util */ |
17 | int trace_event__id(const char *evname); | 20 | int trace_event__id(const char *evname); |
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index ac9a6aacf2f5..f6399373d67d 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h | |||
@@ -99,7 +99,6 @@ void parse_events__set_leader(char *name, struct list_head *list); | |||
99 | void parse_events_update_lists(struct list_head *list_event, | 99 | void parse_events_update_lists(struct list_head *list_event, |
100 | struct list_head *list_all); | 100 | struct list_head *list_all); |
101 | void parse_events_error(void *data, void *scanner, char const *msg); | 101 | void parse_events_error(void *data, void *scanner, char const *msg); |
102 | int parse_events__test(void); | ||
103 | 102 | ||
104 | void print_events(const char *event_glob, bool name_only); | 103 | void print_events(const char *event_glob, bool name_only); |
105 | void print_events_type(u8 type); | 104 | void print_events_type(u8 type); |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 04ccf2962080..de68f98b236d 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -224,7 +224,6 @@ size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp); | |||
224 | size_t symbol__fprintf(struct symbol *sym, FILE *fp); | 224 | size_t symbol__fprintf(struct symbol *sym, FILE *fp); |
225 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); | 225 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); |
226 | 226 | ||
227 | int dso__test_data(void); | ||
228 | int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, | 227 | int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, |
229 | struct symsrc *runtime_ss, symbol_filter_t filter, | 228 | struct symsrc *runtime_ss, symbol_filter_t filter, |
230 | int kmodule); | 229 | int kmodule); |