diff options
42 files changed, 89 insertions, 88 deletions
diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h index 7ed00f4b0908..b48de2f5813c 100644 --- a/tools/perf/arch/x86/include/arch-tests.h +++ b/tools/perf/arch/x86/include/arch-tests.h | |||
@@ -2,10 +2,10 @@ | |||
2 | #define ARCH_TESTS_H | 2 | #define ARCH_TESTS_H |
3 | 3 | ||
4 | /* Tests */ | 4 | /* Tests */ |
5 | int test__rdpmc(void); | 5 | int test__rdpmc(int subtest); |
6 | int test__perf_time_to_tsc(void); | 6 | int test__perf_time_to_tsc(int subtest); |
7 | int test__insn_x86(void); | 7 | int test__insn_x86(int subtest); |
8 | int test__intel_cqm_count_nmi_context(void); | 8 | int test__intel_cqm_count_nmi_context(int subtest); |
9 | 9 | ||
10 | #ifdef HAVE_DWARF_UNWIND_SUPPORT | 10 | #ifdef HAVE_DWARF_UNWIND_SUPPORT |
11 | struct thread; | 11 | struct thread; |
diff --git a/tools/perf/arch/x86/tests/insn-x86.c b/tools/perf/arch/x86/tests/insn-x86.c index b6115dfd28f0..08d9b2bc185c 100644 --- a/tools/perf/arch/x86/tests/insn-x86.c +++ b/tools/perf/arch/x86/tests/insn-x86.c | |||
@@ -171,7 +171,7 @@ static int test_data_set(struct test_data *dat_set, int x86_64) | |||
171 | * verbose (-v) option to see all the instructions and whether or not they | 171 | * verbose (-v) option to see all the instructions and whether or not they |
172 | * decoded successfuly. | 172 | * decoded successfuly. |
173 | */ | 173 | */ |
174 | int test__insn_x86(void) | 174 | int test__insn_x86(int subtest __maybe_unused) |
175 | { | 175 | { |
176 | int ret = 0; | 176 | int ret = 0; |
177 | 177 | ||
diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c index d28c1b6a3b54..94e0cb7462f9 100644 --- a/tools/perf/arch/x86/tests/intel-cqm.c +++ b/tools/perf/arch/x86/tests/intel-cqm.c | |||
@@ -33,7 +33,7 @@ static pid_t spawn(void) | |||
33 | * the last read counter value to avoid triggering a WARN_ON_ONCE() in | 33 | * the last read counter value to avoid triggering a WARN_ON_ONCE() in |
34 | * smp_call_function_many() caused by sending IPIs from NMI context. | 34 | * smp_call_function_many() caused by sending IPIs from NMI context. |
35 | */ | 35 | */ |
36 | int test__intel_cqm_count_nmi_context(void) | 36 | int test__intel_cqm_count_nmi_context(int subtest __maybe_unused) |
37 | { | 37 | { |
38 | struct perf_evlist *evlist = NULL; | 38 | struct perf_evlist *evlist = NULL; |
39 | struct perf_evsel *evsel = NULL; | 39 | struct perf_evsel *evsel = NULL; |
diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c index 658cd200af74..a289aa8a083a 100644 --- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c +++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * %0 is returned, otherwise %-1 is returned. If TSC conversion is not | 35 | * %0 is returned, otherwise %-1 is returned. If TSC conversion is not |
36 | * supported then then the test passes but " (not supported)" is printed. | 36 | * supported then then the test passes but " (not supported)" is printed. |
37 | */ | 37 | */ |
38 | int test__perf_time_to_tsc(void) | 38 | int test__perf_time_to_tsc(int subtest __maybe_unused) |
39 | { | 39 | { |
40 | struct record_opts opts = { | 40 | struct record_opts opts = { |
41 | .mmap_pages = UINT_MAX, | 41 | .mmap_pages = UINT_MAX, |
diff --git a/tools/perf/arch/x86/tests/rdpmc.c b/tools/perf/arch/x86/tests/rdpmc.c index e7688214c7cf..7bb0d13c235f 100644 --- a/tools/perf/arch/x86/tests/rdpmc.c +++ b/tools/perf/arch/x86/tests/rdpmc.c | |||
@@ -149,7 +149,7 @@ out_close: | |||
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | int test__rdpmc(void) | 152 | int test__rdpmc(int subtest __maybe_unused) |
153 | { | 153 | { |
154 | int status = 0; | 154 | int status = 0; |
155 | int wret = 0; | 155 | int wret = 0; |
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 638875a0960a..b66730eb94e3 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c | |||
@@ -153,7 +153,7 @@ static int run_dir(const char *d, const char *perf) | |||
153 | return system(cmd); | 153 | return system(cmd); |
154 | } | 154 | } |
155 | 155 | ||
156 | int test__attr(void) | 156 | int test__attr(int subtest __maybe_unused) |
157 | { | 157 | { |
158 | struct stat st; | 158 | struct stat st; |
159 | char path_perf[PATH_MAX]; | 159 | char path_perf[PATH_MAX]; |
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index a02b035fd5aa..fb80c9eb6a95 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c | |||
@@ -111,7 +111,7 @@ static long long bp_count(int fd) | |||
111 | return count; | 111 | return count; |
112 | } | 112 | } |
113 | 113 | ||
114 | int test__bp_signal(void) | 114 | int test__bp_signal(int subtest __maybe_unused) |
115 | { | 115 | { |
116 | struct sigaction sa; | 116 | struct sigaction sa; |
117 | long long count1, count2; | 117 | long long count1, count2; |
diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c index e76537724491..89f92fa67cc4 100644 --- a/tools/perf/tests/bp_signal_overflow.c +++ b/tools/perf/tests/bp_signal_overflow.c | |||
@@ -58,7 +58,7 @@ static long long bp_count(int fd) | |||
58 | #define EXECUTIONS 10000 | 58 | #define EXECUTIONS 10000 |
59 | #define THRESHOLD 100 | 59 | #define THRESHOLD 100 |
60 | 60 | ||
61 | int test__bp_signal_overflow(void) | 61 | int test__bp_signal_overflow(int subtest __maybe_unused) |
62 | { | 62 | { |
63 | struct perf_event_attr pe; | 63 | struct perf_event_attr pe; |
64 | struct sigaction sa; | 64 | struct sigaction sa; |
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 232043cc232a..4efdc1607754 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c | |||
@@ -215,7 +215,7 @@ out: | |||
215 | return ret; | 215 | return ret; |
216 | } | 216 | } |
217 | 217 | ||
218 | int test__bpf(void) | 218 | int test__bpf(int subtest __maybe_unused) |
219 | { | 219 | { |
220 | unsigned int i; | 220 | unsigned int i; |
221 | int err; | 221 | int err; |
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 80c442eab767..9cf4892c061d 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -203,7 +203,7 @@ static bool perf_test__matches(struct test *test, int curr, int argc, const char | |||
203 | return false; | 203 | return false; |
204 | } | 204 | } |
205 | 205 | ||
206 | static int run_test(struct test *test) | 206 | static int run_test(struct test *test, int subtest) |
207 | { | 207 | { |
208 | int status, err = -1, child = fork(); | 208 | int status, err = -1, child = fork(); |
209 | char sbuf[STRERR_BUFSIZE]; | 209 | char sbuf[STRERR_BUFSIZE]; |
@@ -216,7 +216,7 @@ static int run_test(struct test *test) | |||
216 | 216 | ||
217 | if (!child) { | 217 | if (!child) { |
218 | pr_debug("test child forked, pid %d\n", getpid()); | 218 | pr_debug("test child forked, pid %d\n", getpid()); |
219 | err = test->func(); | 219 | err = test->func(subtest); |
220 | exit(err); | 220 | exit(err); |
221 | } | 221 | } |
222 | 222 | ||
@@ -265,7 +265,7 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | pr_debug("\n--- start ---\n"); | 267 | pr_debug("\n--- start ---\n"); |
268 | err = run_test(t); | 268 | err = run_test(t, i); |
269 | pr_debug("---- end ----\n%s:", t->desc); | 269 | pr_debug("---- end ----\n%s:", t->desc); |
270 | 270 | ||
271 | switch (err) { | 271 | switch (err) { |
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index a767a6400c5c..4417b6a079f0 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -601,7 +601,7 @@ out_err: | |||
601 | return err; | 601 | return err; |
602 | } | 602 | } |
603 | 603 | ||
604 | int test__code_reading(void) | 604 | int test__code_reading(int subtest __maybe_unused) |
605 | { | 605 | { |
606 | int ret; | 606 | int ret; |
607 | 607 | ||
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index a218aeaf56a0..dc673ff7c437 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c | |||
@@ -110,7 +110,7 @@ static int dso__data_fd(struct dso *dso, struct machine *machine) | |||
110 | return fd; | 110 | return fd; |
111 | } | 111 | } |
112 | 112 | ||
113 | int test__dso_data(void) | 113 | int test__dso_data(int subtest __maybe_unused) |
114 | { | 114 | { |
115 | struct machine machine; | 115 | struct machine machine; |
116 | struct dso *dso; | 116 | struct dso *dso; |
@@ -245,7 +245,7 @@ static int set_fd_limit(int n) | |||
245 | return setrlimit(RLIMIT_NOFILE, &rlim); | 245 | return setrlimit(RLIMIT_NOFILE, &rlim); |
246 | } | 246 | } |
247 | 247 | ||
248 | int test__dso_data_cache(void) | 248 | int test__dso_data_cache(int subtest __maybe_unused) |
249 | { | 249 | { |
250 | struct machine machine; | 250 | struct machine machine; |
251 | long nr_end, nr = open_files_cnt(); | 251 | long nr_end, nr = open_files_cnt(); |
@@ -302,7 +302,7 @@ int test__dso_data_cache(void) | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | int test__dso_data_reopen(void) | 305 | int test__dso_data_reopen(int subtest __maybe_unused) |
306 | { | 306 | { |
307 | struct machine machine; | 307 | struct machine machine; |
308 | long nr_end, nr = open_files_cnt(); | 308 | long nr_end, nr = open_files_cnt(); |
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c index 07221793a3ac..01f0b61de53d 100644 --- a/tools/perf/tests/dwarf-unwind.c +++ b/tools/perf/tests/dwarf-unwind.c | |||
@@ -142,7 +142,7 @@ static int krava_1(struct thread *thread) | |||
142 | return krava_2(thread); | 142 | return krava_2(thread); |
143 | } | 143 | } |
144 | 144 | ||
145 | int test__dwarf_unwind(void) | 145 | int test__dwarf_unwind(int subtest __maybe_unused) |
146 | { | 146 | { |
147 | struct machines machines; | 147 | struct machines machines; |
148 | struct machine *machine; | 148 | struct machine *machine; |
diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c index 3fa715987a5e..1da92e1159ee 100644 --- a/tools/perf/tests/evsel-roundtrip-name.c +++ b/tools/perf/tests/evsel-roundtrip-name.c | |||
@@ -95,7 +95,7 @@ out_delete_evlist: | |||
95 | #define perf_evsel__name_array_test(names) \ | 95 | #define perf_evsel__name_array_test(names) \ |
96 | __perf_evsel__name_array_test(names, ARRAY_SIZE(names)) | 96 | __perf_evsel__name_array_test(names, ARRAY_SIZE(names)) |
97 | 97 | ||
98 | int test__perf_evsel__roundtrip_name_test(void) | 98 | int test__perf_evsel__roundtrip_name_test(int subtest __maybe_unused) |
99 | { | 99 | { |
100 | int err = 0, ret = 0; | 100 | int err = 0, ret = 0; |
101 | 101 | ||
diff --git a/tools/perf/tests/evsel-tp-sched.c b/tools/perf/tests/evsel-tp-sched.c index 790e413d9a1f..1984b3bbfe15 100644 --- a/tools/perf/tests/evsel-tp-sched.c +++ b/tools/perf/tests/evsel-tp-sched.c | |||
@@ -32,7 +32,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name, | |||
32 | return ret; | 32 | return ret; |
33 | } | 33 | } |
34 | 34 | ||
35 | int test__perf_evsel__tp_sched_test(void) | 35 | int test__perf_evsel__tp_sched_test(int subtest __maybe_unused) |
36 | { | 36 | { |
37 | struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch"); | 37 | struct perf_evsel *evsel = perf_evsel__newtp("sched", "sched_switch"); |
38 | int ret = 0; | 38 | int ret = 0; |
diff --git a/tools/perf/tests/fdarray.c b/tools/perf/tests/fdarray.c index d24b837951d4..c809463edbe5 100644 --- a/tools/perf/tests/fdarray.c +++ b/tools/perf/tests/fdarray.c | |||
@@ -25,7 +25,7 @@ static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILE | |||
25 | return printed + fdarray__fprintf(fda, fp); | 25 | return printed + fdarray__fprintf(fda, fp); |
26 | } | 26 | } |
27 | 27 | ||
28 | int test__fdarray__filter(void) | 28 | int test__fdarray__filter(int subtest __maybe_unused) |
29 | { | 29 | { |
30 | int nr_fds, expected_fd[2], fd, err = TEST_FAIL; | 30 | int nr_fds, expected_fd[2], fd, err = TEST_FAIL; |
31 | struct fdarray *fda = fdarray__new(5, 5); | 31 | struct fdarray *fda = fdarray__new(5, 5); |
@@ -103,7 +103,7 @@ out: | |||
103 | return err; | 103 | return err; |
104 | } | 104 | } |
105 | 105 | ||
106 | int test__fdarray__add(void) | 106 | int test__fdarray__add(int subtest __maybe_unused) |
107 | { | 107 | { |
108 | int err = TEST_FAIL; | 108 | int err = TEST_FAIL; |
109 | struct fdarray *fda = fdarray__new(2, 2); | 109 | struct fdarray *fda = fdarray__new(2, 2); |
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index 7ed737019de7..8292948bc5f9 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c | |||
@@ -686,7 +686,7 @@ out: | |||
686 | return err; | 686 | return err; |
687 | } | 687 | } |
688 | 688 | ||
689 | int test__hists_cumulate(void) | 689 | int test__hists_cumulate(int subtest __maybe_unused) |
690 | { | 690 | { |
691 | int err = TEST_FAIL; | 691 | int err = TEST_FAIL; |
692 | struct machines machines; | 692 | struct machines machines; |
diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index 818acf875dd0..ccb5b4921f25 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c | |||
@@ -104,7 +104,7 @@ out: | |||
104 | return TEST_FAIL; | 104 | return TEST_FAIL; |
105 | } | 105 | } |
106 | 106 | ||
107 | int test__hists_filter(void) | 107 | int test__hists_filter(int subtest __maybe_unused) |
108 | { | 108 | { |
109 | int err = TEST_FAIL; | 109 | int err = TEST_FAIL; |
110 | struct machines machines; | 110 | struct machines machines; |
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index 8c102b011424..6243e2b2a245 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c | |||
@@ -274,7 +274,7 @@ static int validate_link(struct hists *leader, struct hists *other) | |||
274 | return __validate_link(leader, 0) || __validate_link(other, 1); | 274 | return __validate_link(leader, 0) || __validate_link(other, 1); |
275 | } | 275 | } |
276 | 276 | ||
277 | int test__hists_link(void) | 277 | int test__hists_link(int subtest __maybe_unused) |
278 | { | 278 | { |
279 | int err = -1; | 279 | int err = -1; |
280 | struct hists *hists, *first_hists; | 280 | struct hists *hists, *first_hists; |
diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index adbebc852cc8..248beec1d917 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c | |||
@@ -576,7 +576,7 @@ out: | |||
576 | return err; | 576 | return err; |
577 | } | 577 | } |
578 | 578 | ||
579 | int test__hists_output(void) | 579 | int test__hists_output(int subtest __maybe_unused) |
580 | { | 580 | { |
581 | int err = TEST_FAIL; | 581 | int err = TEST_FAIL; |
582 | struct machines machines; | 582 | struct machines machines; |
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c index a2e2269aa093..a337a6da1f39 100644 --- a/tools/perf/tests/keep-tracking.c +++ b/tools/perf/tests/keep-tracking.c | |||
@@ -49,7 +49,7 @@ static int find_comm(struct perf_evlist *evlist, const char *comm) | |||
49 | * when an event is disabled but a dummy software event is not disabled. If the | 49 | * when an event is disabled but a dummy software event is not disabled. If the |
50 | * test passes %0 is returned, otherwise %-1 is returned. | 50 | * test passes %0 is returned, otherwise %-1 is returned. |
51 | */ | 51 | */ |
52 | int test__keep_tracking(void) | 52 | int test__keep_tracking(int subtest __maybe_unused) |
53 | { | 53 | { |
54 | struct record_opts opts = { | 54 | struct record_opts opts = { |
55 | .mmap_pages = UINT_MAX, | 55 | .mmap_pages = UINT_MAX, |
diff --git a/tools/perf/tests/kmod-path.c b/tools/perf/tests/kmod-path.c index 08c433b4bf4f..d2af78193153 100644 --- a/tools/perf/tests/kmod-path.c +++ b/tools/perf/tests/kmod-path.c | |||
@@ -49,7 +49,7 @@ static int test_is_kernel_module(const char *path, int cpumode, bool expect) | |||
49 | #define M(path, c, e) \ | 49 | #define M(path, c, e) \ |
50 | TEST_ASSERT_VAL("failed", !test_is_kernel_module(path, c, e)) | 50 | TEST_ASSERT_VAL("failed", !test_is_kernel_module(path, c, e)) |
51 | 51 | ||
52 | int test__kmod_path__parse(void) | 52 | int test__kmod_path__parse(int subtest __maybe_unused) |
53 | { | 53 | { |
54 | /* path alloc_name alloc_ext kmod comp name ext */ | 54 | /* path alloc_name alloc_ext kmod comp name ext */ |
55 | T("/xxxx/xxxx/x-x.ko", true , true , true, false, "[x_x]", NULL); | 55 | T("/xxxx/xxxx/x-x.ko", true , true , true, false, "[x_x]", NULL); |
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c index b4147634fb44..4350c455d06c 100644 --- a/tools/perf/tests/llvm.c +++ b/tools/perf/tests/llvm.c | |||
@@ -131,7 +131,7 @@ out: | |||
131 | return ret; | 131 | return ret; |
132 | } | 132 | } |
133 | 133 | ||
134 | int test__llvm(void) | 134 | int test__llvm(int subtest __maybe_unused) |
135 | { | 135 | { |
136 | enum test_llvm__testcase i; | 136 | enum test_llvm__testcase i; |
137 | 137 | ||
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 4495493c9431..359e98fcd94c 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * Then it checks if the number of syscalls reported as perf events by | 16 | * Then it checks if the number of syscalls reported as perf events by |
17 | * the kernel corresponds to the number of syscalls made. | 17 | * the kernel corresponds to the number of syscalls made. |
18 | */ | 18 | */ |
19 | int test__basic_mmap(void) | 19 | int test__basic_mmap(int subtest __maybe_unused) |
20 | { | 20 | { |
21 | int err = -1; | 21 | int err = -1; |
22 | union perf_event *event; | 22 | union perf_event *event; |
diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c index 145050e2e544..6cdb97579c45 100644 --- a/tools/perf/tests/mmap-thread-lookup.c +++ b/tools/perf/tests/mmap-thread-lookup.c | |||
@@ -221,7 +221,7 @@ static int mmap_events(synth_cb synth) | |||
221 | * | 221 | * |
222 | * by using all thread objects. | 222 | * by using all thread objects. |
223 | */ | 223 | */ |
224 | int test__mmap_thread_lookup(void) | 224 | int test__mmap_thread_lookup(int subtest __maybe_unused) |
225 | { | 225 | { |
226 | /* perf_event__synthesize_threads synthesize */ | 226 | /* perf_event__synthesize_threads synthesize */ |
227 | TEST_ASSERT_VAL("failed with sythesizing all", | 227 | TEST_ASSERT_VAL("failed with sythesizing all", |
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c index 2006485a2859..53c2273e8859 100644 --- a/tools/perf/tests/openat-syscall-all-cpus.c +++ b/tools/perf/tests/openat-syscall-all-cpus.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include "debug.h" | 7 | #include "debug.h" |
8 | #include "stat.h" | 8 | #include "stat.h" |
9 | 9 | ||
10 | int test__openat_syscall_event_on_all_cpus(void) | 10 | int test__openat_syscall_event_on_all_cpus(int subtest __maybe_unused) |
11 | { | 11 | { |
12 | int err = -1, fd, cpu; | 12 | int err = -1, fd, cpu; |
13 | struct cpu_map *cpus; | 13 | struct cpu_map *cpus; |
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 5e811cd8f1c3..eb99a105f31c 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include "tests.h" | 6 | #include "tests.h" |
7 | #include "debug.h" | 7 | #include "debug.h" |
8 | 8 | ||
9 | int test__syscall_openat_tp_fields(void) | 9 | int test__syscall_openat_tp_fields(int subtest __maybe_unused) |
10 | { | 10 | { |
11 | struct record_opts opts = { | 11 | struct record_opts opts = { |
12 | .target = { | 12 | .target = { |
diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c index 033b54797b8a..1184f9ba6499 100644 --- a/tools/perf/tests/openat-syscall.c +++ b/tools/perf/tests/openat-syscall.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include "debug.h" | 5 | #include "debug.h" |
6 | #include "tests.h" | 6 | #include "tests.h" |
7 | 7 | ||
8 | int test__openat_syscall_event(void) | 8 | int test__openat_syscall_event(int subtest __maybe_unused) |
9 | { | 9 | { |
10 | int err = -1, fd; | 10 | int err = -1, fd; |
11 | struct perf_evsel *evsel; | 11 | struct perf_evsel *evsel; |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 636d7b42d844..abe8849d1d70 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -1765,7 +1765,7 @@ static void debug_warn(const char *warn, va_list params) | |||
1765 | fprintf(stderr, " Warning: %s\n", msg); | 1765 | fprintf(stderr, " Warning: %s\n", msg); |
1766 | } | 1766 | } |
1767 | 1767 | ||
1768 | int test__parse_events(void) | 1768 | int test__parse_events(int subtest __maybe_unused) |
1769 | { | 1769 | { |
1770 | int ret1, ret2 = 0; | 1770 | int ret1, ret2 = 0; |
1771 | 1771 | ||
diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c index 2c63ea658541..294c76b01b41 100644 --- a/tools/perf/tests/parse-no-sample-id-all.c +++ b/tools/perf/tests/parse-no-sample-id-all.c | |||
@@ -67,7 +67,7 @@ struct test_attr_event { | |||
67 | * | 67 | * |
68 | * Return: %0 on success, %-1 if the test fails. | 68 | * Return: %0 on success, %-1 if the test fails. |
69 | */ | 69 | */ |
70 | int test__parse_no_sample_id_all(void) | 70 | int test__parse_no_sample_id_all(int subtest __maybe_unused) |
71 | { | 71 | { |
72 | int err; | 72 | int err; |
73 | 73 | ||
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index 7a228a2a070b..9d5f0b57c4c1 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c | |||
@@ -32,7 +32,7 @@ realloc: | |||
32 | return cpu; | 32 | return cpu; |
33 | } | 33 | } |
34 | 34 | ||
35 | int test__PERF_RECORD(void) | 35 | int test__PERF_RECORD(int subtest __maybe_unused) |
36 | { | 36 | { |
37 | struct record_opts opts = { | 37 | struct record_opts opts = { |
38 | .target = { | 38 | .target = { |
diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c index faa04e9d5d5f..1e2ba2602930 100644 --- a/tools/perf/tests/pmu.c +++ b/tools/perf/tests/pmu.c | |||
@@ -133,7 +133,7 @@ static struct list_head *test_terms_list(void) | |||
133 | return &terms; | 133 | return &terms; |
134 | } | 134 | } |
135 | 135 | ||
136 | int test__pmu(void) | 136 | int test__pmu(int subtest __maybe_unused) |
137 | { | 137 | { |
138 | char *format = test_format_dir_get(); | 138 | char *format = test_format_dir_get(); |
139 | LIST_HEAD(formats); | 139 | LIST_HEAD(formats); |
diff --git a/tools/perf/tests/python-use.c b/tools/perf/tests/python-use.c index 7760277c6def..7a52834ee0d0 100644 --- a/tools/perf/tests/python-use.c +++ b/tools/perf/tests/python-use.c | |||
@@ -4,11 +4,12 @@ | |||
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <linux/compiler.h> | ||
7 | #include "tests.h" | 8 | #include "tests.h" |
8 | 9 | ||
9 | extern int verbose; | 10 | extern int verbose; |
10 | 11 | ||
11 | int test__python_use(void) | 12 | int test__python_use(int subtest __maybe_unused) |
12 | { | 13 | { |
13 | char *cmd; | 14 | char *cmd; |
14 | int ret; | 15 | int ret; |
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 30c02181e78b..5f23710b9fee 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c | |||
@@ -290,7 +290,7 @@ out_free: | |||
290 | * checks sample format bits separately and together. If the test passes %0 is | 290 | * checks sample format bits separately and together. If the test passes %0 is |
291 | * returned, otherwise %-1 is returned. | 291 | * returned, otherwise %-1 is returned. |
292 | */ | 292 | */ |
293 | int test__sample_parsing(void) | 293 | int test__sample_parsing(int subtest __maybe_unused) |
294 | { | 294 | { |
295 | const u64 rf[] = {4, 5, 6, 7, 12, 13, 14, 15}; | 295 | const u64 rf[] = {4, 5, 6, 7, 12, 13, 14, 15}; |
296 | u64 sample_type; | 296 | u64 sample_type; |
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 5b83f56a3b6f..36e8ce1550e3 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c | |||
@@ -122,7 +122,7 @@ out_delete_evlist: | |||
122 | return err; | 122 | return err; |
123 | } | 123 | } |
124 | 124 | ||
125 | int test__sw_clock_freq(void) | 125 | int test__sw_clock_freq(int subtest __maybe_unused) |
126 | { | 126 | { |
127 | int ret; | 127 | int ret; |
128 | 128 | ||
diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c index a02af503100c..dfbd8d69ce89 100644 --- a/tools/perf/tests/switch-tracking.c +++ b/tools/perf/tests/switch-tracking.c | |||
@@ -305,7 +305,7 @@ out_free_nodes: | |||
305 | * evsel->system_wide and evsel->tracking flags (respectively) with other events | 305 | * evsel->system_wide and evsel->tracking flags (respectively) with other events |
306 | * sometimes enabled or disabled. | 306 | * sometimes enabled or disabled. |
307 | */ | 307 | */ |
308 | int test__switch_tracking(void) | 308 | int test__switch_tracking(int subtest __maybe_unused) |
309 | { | 309 | { |
310 | const char *sched_switch = "sched:sched_switch"; | 310 | const char *sched_switch = "sched:sched_switch"; |
311 | struct switch_tracking switch_tracking = { .tids = NULL, }; | 311 | struct switch_tracking switch_tracking = { .tids = NULL, }; |
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index add16385f13e..2dfff7ac8ef3 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c | |||
@@ -31,7 +31,7 @@ static void workload_exec_failed_signal(int signo __maybe_unused, | |||
31 | * if the number of exit event reported by the kernel is 1 or not | 31 | * if the number of exit event reported by the kernel is 1 or not |
32 | * in order to check the kernel returns correct number of event. | 32 | * in order to check the kernel returns correct number of event. |
33 | */ | 33 | */ |
34 | int test__task_exit(void) | 34 | int test__task_exit(int subtest __maybe_unused) |
35 | { | 35 | { |
36 | int err = -1; | 36 | int err = -1; |
37 | union perf_event *event; | 37 | union perf_event *event; |
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index 3c8734a3abbc..204e4eeadea2 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h | |||
@@ -26,48 +26,48 @@ enum { | |||
26 | 26 | ||
27 | struct test { | 27 | struct test { |
28 | const char *desc; | 28 | const char *desc; |
29 | int (*func)(void); | 29 | int (*func)(int subtest); |
30 | }; | 30 | }; |
31 | 31 | ||
32 | /* Tests */ | 32 | /* Tests */ |
33 | int test__vmlinux_matches_kallsyms(void); | 33 | int test__vmlinux_matches_kallsyms(int subtest); |
34 | int test__openat_syscall_event(void); | 34 | int test__openat_syscall_event(int subtest); |
35 | int test__openat_syscall_event_on_all_cpus(void); | 35 | int test__openat_syscall_event_on_all_cpus(int subtest); |
36 | int test__basic_mmap(void); | 36 | int test__basic_mmap(int subtest); |
37 | int test__PERF_RECORD(void); | 37 | int test__PERF_RECORD(int subtest); |
38 | int test__perf_evsel__roundtrip_name_test(void); | 38 | int test__perf_evsel__roundtrip_name_test(int subtest); |
39 | int test__perf_evsel__tp_sched_test(void); | 39 | int test__perf_evsel__tp_sched_test(int subtest); |
40 | int test__syscall_openat_tp_fields(void); | 40 | int test__syscall_openat_tp_fields(int subtest); |
41 | int test__pmu(void); | 41 | int test__pmu(int subtest); |
42 | int test__attr(void); | 42 | int test__attr(int subtest); |
43 | int test__dso_data(void); | 43 | int test__dso_data(int subtest); |
44 | int test__dso_data_cache(void); | 44 | int test__dso_data_cache(int subtest); |
45 | int test__dso_data_reopen(void); | 45 | int test__dso_data_reopen(int subtest); |
46 | int test__parse_events(void); | 46 | int test__parse_events(int subtest); |
47 | int test__hists_link(void); | 47 | int test__hists_link(int subtest); |
48 | int test__python_use(void); | 48 | int test__python_use(int subtest); |
49 | int test__bp_signal(void); | 49 | int test__bp_signal(int subtest); |
50 | int test__bp_signal_overflow(void); | 50 | int test__bp_signal_overflow(int subtest); |
51 | int test__task_exit(void); | 51 | int test__task_exit(int subtest); |
52 | int test__sw_clock_freq(void); | 52 | int test__sw_clock_freq(int subtest); |
53 | int test__code_reading(void); | 53 | int test__code_reading(int subtest); |
54 | int test__sample_parsing(void); | 54 | int test__sample_parsing(int subtest); |
55 | int test__keep_tracking(void); | 55 | int test__keep_tracking(int subtest); |
56 | int test__parse_no_sample_id_all(void); | 56 | int test__parse_no_sample_id_all(int subtest); |
57 | int test__dwarf_unwind(void); | 57 | int test__dwarf_unwind(int subtest); |
58 | int test__hists_filter(void); | 58 | int test__hists_filter(int subtest); |
59 | int test__mmap_thread_lookup(void); | 59 | int test__mmap_thread_lookup(int subtest); |
60 | int test__thread_mg_share(void); | 60 | int test__thread_mg_share(int subtest); |
61 | int test__hists_output(void); | 61 | int test__hists_output(int subtest); |
62 | int test__hists_cumulate(void); | 62 | int test__hists_cumulate(int subtest); |
63 | int test__switch_tracking(void); | 63 | int test__switch_tracking(int subtest); |
64 | int test__fdarray__filter(void); | 64 | int test__fdarray__filter(int subtest); |
65 | int test__fdarray__add(void); | 65 | int test__fdarray__add(int subtest); |
66 | int test__kmod_path__parse(void); | 66 | int test__kmod_path__parse(int subtest); |
67 | int test__thread_map(void); | 67 | int test__thread_map(int subtest); |
68 | int test__llvm(void); | 68 | int test__llvm(int subtest); |
69 | int test__bpf(void); | 69 | int test__bpf(int subtest); |
70 | int test_session_topology(void); | 70 | int test_session_topology(int subtest); |
71 | 71 | ||
72 | #if defined(__arm__) || defined(__aarch64__) | 72 | #if defined(__arm__) || defined(__aarch64__) |
73 | #ifdef HAVE_DWARF_UNWIND_SUPPORT | 73 | #ifdef HAVE_DWARF_UNWIND_SUPPORT |
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c index 138a0e3431fa..2be02d303e82 100644 --- a/tools/perf/tests/thread-map.c +++ b/tools/perf/tests/thread-map.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "thread_map.h" | 4 | #include "thread_map.h" |
5 | #include "debug.h" | 5 | #include "debug.h" |
6 | 6 | ||
7 | int test__thread_map(void) | 7 | int test__thread_map(int subtest __maybe_unused) |
8 | { | 8 | { |
9 | struct thread_map *map; | 9 | struct thread_map *map; |
10 | 10 | ||
diff --git a/tools/perf/tests/thread-mg-share.c b/tools/perf/tests/thread-mg-share.c index 01fabb19d746..188b63140fc8 100644 --- a/tools/perf/tests/thread-mg-share.c +++ b/tools/perf/tests/thread-mg-share.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "map.h" | 4 | #include "map.h" |
5 | #include "debug.h" | 5 | #include "debug.h" |
6 | 6 | ||
7 | int test__thread_mg_share(void) | 7 | int test__thread_mg_share(int subtest __maybe_unused) |
8 | { | 8 | { |
9 | struct machines machines; | 9 | struct machines machines; |
10 | struct machine *machine; | 10 | struct machine *machine; |
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c index f5bb096c3bd9..98fe69ac553c 100644 --- a/tools/perf/tests/topology.c +++ b/tools/perf/tests/topology.c | |||
@@ -84,7 +84,7 @@ static int check_cpu_topology(char *path, struct cpu_map *map) | |||
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
86 | 86 | ||
87 | int test_session_topology(void) | 87 | int test_session_topology(int subtest __maybe_unused) |
88 | { | 88 | { |
89 | char path[PATH_MAX]; | 89 | char path[PATH_MAX]; |
90 | struct cpu_map *map; | 90 | struct cpu_map *map; |
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c index d677e018e504..f0bfc9e8fd9f 100644 --- a/tools/perf/tests/vmlinux-kallsyms.c +++ b/tools/perf/tests/vmlinux-kallsyms.c | |||
@@ -18,7 +18,7 @@ static int vmlinux_matches_kallsyms_filter(struct map *map __maybe_unused, | |||
18 | 18 | ||
19 | #define UM(x) kallsyms_map->unmap_ip(kallsyms_map, (x)) | 19 | #define UM(x) kallsyms_map->unmap_ip(kallsyms_map, (x)) |
20 | 20 | ||
21 | int test__vmlinux_matches_kallsyms(void) | 21 | int test__vmlinux_matches_kallsyms(int subtest __maybe_unused) |
22 | { | 22 | { |
23 | int err = -1; | 23 | int err = -1; |
24 | struct rb_node *nd; | 24 | struct rb_node *nd; |