diff options
Diffstat (limited to 'tools/perf/tests')
-rw-r--r-- | tools/perf/tests/attr.c | 6 | ||||
-rw-r--r-- | tools/perf/tests/backward-ring-buffer.c | 6 | ||||
-rw-r--r-- | tools/perf/tests/bp_signal.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/bpf-script-example.c | 4 | ||||
-rw-r--r-- | tools/perf/tests/bpf.c | 68 | ||||
-rw-r--r-- | tools/perf/tests/builtin-test.c | 10 | ||||
-rw-r--r-- | tools/perf/tests/code-reading.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/dwarf-unwind.c | 1 | ||||
-rw-r--r-- | tools/perf/tests/keep-tracking.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/mmap-basic.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/openat-syscall-tp-fields.c | 5 | ||||
-rw-r--r-- | tools/perf/tests/parse-events.c | 1 | ||||
-rw-r--r-- | tools/perf/tests/perf-record.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/sample-parsing.c | 2 | ||||
-rwxr-xr-x | tools/perf/tests/shell/trace+probe_vfs_getname.sh | 7 | ||||
-rw-r--r-- | tools/perf/tests/sw-clock.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/switch-tracking.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/task-exit.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/thread-map.c | 2 |
19 files changed, 66 insertions, 62 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 0e1367f90af5..97f64ad7fa08 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c | |||
@@ -124,6 +124,12 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, | |||
124 | WRITE_ASS(exclude_guest, "d"); | 124 | WRITE_ASS(exclude_guest, "d"); |
125 | WRITE_ASS(exclude_callchain_kernel, "d"); | 125 | WRITE_ASS(exclude_callchain_kernel, "d"); |
126 | WRITE_ASS(exclude_callchain_user, "d"); | 126 | WRITE_ASS(exclude_callchain_user, "d"); |
127 | WRITE_ASS(mmap2, "d"); | ||
128 | WRITE_ASS(comm_exec, "d"); | ||
129 | WRITE_ASS(context_switch, "d"); | ||
130 | WRITE_ASS(write_backward, "d"); | ||
131 | WRITE_ASS(namespaces, "d"); | ||
132 | WRITE_ASS(use_clockid, "d"); | ||
127 | WRITE_ASS(wakeup_events, PRIu32); | 133 | WRITE_ASS(wakeup_events, PRIu32); |
128 | WRITE_ASS(bp_type, PRIu32); | 134 | WRITE_ASS(bp_type, PRIu32); |
129 | WRITE_ASS(config1, "llu"); | 135 | WRITE_ASS(config1, "llu"); |
diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index 71b9a0b613d2..4035d43523c3 100644 --- a/tools/perf/tests/backward-ring-buffer.c +++ b/tools/perf/tests/backward-ring-buffer.c | |||
@@ -33,8 +33,8 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count, | |||
33 | for (i = 0; i < evlist->nr_mmaps; i++) { | 33 | for (i = 0; i < evlist->nr_mmaps; i++) { |
34 | union perf_event *event; | 34 | union perf_event *event; |
35 | 35 | ||
36 | perf_mmap__read_catchup(&evlist->backward_mmap[i]); | 36 | perf_mmap__read_catchup(&evlist->overwrite_mmap[i]); |
37 | while ((event = perf_mmap__read_backward(&evlist->backward_mmap[i])) != NULL) { | 37 | while ((event = perf_mmap__read_backward(&evlist->overwrite_mmap[i])) != NULL) { |
38 | const u32 type = event->header.type; | 38 | const u32 type = event->header.type; |
39 | 39 | ||
40 | switch (type) { | 40 | switch (type) { |
@@ -59,7 +59,7 @@ static int do_test(struct perf_evlist *evlist, int mmap_pages, | |||
59 | int err; | 59 | int err; |
60 | char sbuf[STRERR_BUFSIZE]; | 60 | char sbuf[STRERR_BUFSIZE]; |
61 | 61 | ||
62 | err = perf_evlist__mmap(evlist, mmap_pages, true); | 62 | err = perf_evlist__mmap(evlist, mmap_pages); |
63 | if (err < 0) { | 63 | if (err < 0) { |
64 | pr_debug("perf_evlist__mmap: %s\n", | 64 | pr_debug("perf_evlist__mmap: %s\n", |
65 | str_error_r(errno, sbuf, sizeof(sbuf))); | 65 | str_error_r(errno, sbuf, sizeof(sbuf))); |
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index 335b695f4970..a467615c5a0e 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c | |||
@@ -296,7 +296,7 @@ bool test__bp_signal_is_supported(void) | |||
296 | * instruction breakpoint using the perf event interface. | 296 | * instruction breakpoint using the perf event interface. |
297 | * Once it's there we can release this. | 297 | * Once it's there we can release this. |
298 | */ | 298 | */ |
299 | #ifdef __powerpc__ | 299 | #if defined(__powerpc__) || defined(__s390x__) |
300 | return false; | 300 | return false; |
301 | #else | 301 | #else |
302 | return true; | 302 | return true; |
diff --git a/tools/perf/tests/bpf-script-example.c b/tools/perf/tests/bpf-script-example.c index 268e5f8e4aa2..e4123c1b0e88 100644 --- a/tools/perf/tests/bpf-script-example.c +++ b/tools/perf/tests/bpf-script-example.c | |||
@@ -31,8 +31,8 @@ struct bpf_map_def SEC("maps") flip_table = { | |||
31 | .max_entries = 1, | 31 | .max_entries = 1, |
32 | }; | 32 | }; |
33 | 33 | ||
34 | SEC("func=SyS_epoll_wait") | 34 | SEC("func=SyS_epoll_pwait") |
35 | int bpf_func__SyS_epoll_wait(void *ctx) | 35 | int bpf_func__SyS_epoll_pwait(void *ctx) |
36 | { | 36 | { |
37 | int ind =0; | 37 | int ind =0; |
38 | int *flag = bpf_map_lookup_elem(&flip_table, &ind); | 38 | int *flag = bpf_map_lookup_elem(&flip_table, &ind); |
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 34c22cdf4d5d..e8399beca62b 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <sys/epoll.h> | 3 | #include <sys/epoll.h> |
4 | #include <sys/types.h> | 4 | #include <sys/types.h> |
5 | #include <sys/stat.h> | 5 | #include <sys/stat.h> |
6 | #include <fcntl.h> | ||
6 | #include <util/util.h> | 7 | #include <util/util.h> |
7 | #include <util/bpf-loader.h> | 8 | #include <util/bpf-loader.h> |
8 | #include <util/evlist.h> | 9 | #include <util/evlist.h> |
@@ -19,13 +20,13 @@ | |||
19 | 20 | ||
20 | #ifdef HAVE_LIBBPF_SUPPORT | 21 | #ifdef HAVE_LIBBPF_SUPPORT |
21 | 22 | ||
22 | static int epoll_wait_loop(void) | 23 | static int epoll_pwait_loop(void) |
23 | { | 24 | { |
24 | int i; | 25 | int i; |
25 | 26 | ||
26 | /* Should fail NR_ITERS times */ | 27 | /* Should fail NR_ITERS times */ |
27 | for (i = 0; i < NR_ITERS; i++) | 28 | for (i = 0; i < NR_ITERS; i++) |
28 | epoll_wait(-(i + 1), NULL, 0, 0); | 29 | epoll_pwait(-(i + 1), NULL, 0, 0, NULL); |
29 | return 0; | 30 | return 0; |
30 | } | 31 | } |
31 | 32 | ||
@@ -63,46 +64,41 @@ static struct { | |||
63 | bool pin; | 64 | bool pin; |
64 | } bpf_testcase_table[] = { | 65 | } bpf_testcase_table[] = { |
65 | { | 66 | { |
66 | LLVM_TESTCASE_BASE, | 67 | .prog_id = LLVM_TESTCASE_BASE, |
67 | "Basic BPF filtering", | 68 | .desc = "Basic BPF filtering", |
68 | "[basic_bpf_test]", | 69 | .name = "[basic_bpf_test]", |
69 | "fix 'perf test LLVM' first", | 70 | .msg_compile_fail = "fix 'perf test LLVM' first", |
70 | "load bpf object failed", | 71 | .msg_load_fail = "load bpf object failed", |
71 | &epoll_wait_loop, | 72 | .target_func = &epoll_pwait_loop, |
72 | (NR_ITERS + 1) / 2, | 73 | .expect_result = (NR_ITERS + 1) / 2, |
73 | false, | ||
74 | }, | 74 | }, |
75 | { | 75 | { |
76 | LLVM_TESTCASE_BASE, | 76 | .prog_id = LLVM_TESTCASE_BASE, |
77 | "BPF pinning", | 77 | .desc = "BPF pinning", |
78 | "[bpf_pinning]", | 78 | .name = "[bpf_pinning]", |
79 | "fix kbuild first", | 79 | .msg_compile_fail = "fix kbuild first", |
80 | "check your vmlinux setting?", | 80 | .msg_load_fail = "check your vmlinux setting?", |
81 | &epoll_wait_loop, | 81 | .target_func = &epoll_pwait_loop, |
82 | (NR_ITERS + 1) / 2, | 82 | .expect_result = (NR_ITERS + 1) / 2, |
83 | true, | 83 | .pin = true, |
84 | }, | 84 | }, |
85 | #ifdef HAVE_BPF_PROLOGUE | 85 | #ifdef HAVE_BPF_PROLOGUE |
86 | { | 86 | { |
87 | LLVM_TESTCASE_BPF_PROLOGUE, | 87 | .prog_id = LLVM_TESTCASE_BPF_PROLOGUE, |
88 | "BPF prologue generation", | 88 | .desc = "BPF prologue generation", |
89 | "[bpf_prologue_test]", | 89 | .name = "[bpf_prologue_test]", |
90 | "fix kbuild first", | 90 | .msg_compile_fail = "fix kbuild first", |
91 | "check your vmlinux setting?", | 91 | .msg_load_fail = "check your vmlinux setting?", |
92 | &llseek_loop, | 92 | .target_func = &llseek_loop, |
93 | (NR_ITERS + 1) / 4, | 93 | .expect_result = (NR_ITERS + 1) / 4, |
94 | false, | ||
95 | }, | 94 | }, |
96 | #endif | 95 | #endif |
97 | { | 96 | { |
98 | LLVM_TESTCASE_BPF_RELOCATION, | 97 | .prog_id = LLVM_TESTCASE_BPF_RELOCATION, |
99 | "BPF relocation checker", | 98 | .desc = "BPF relocation checker", |
100 | "[bpf_relocation_test]", | 99 | .name = "[bpf_relocation_test]", |
101 | "fix 'perf test LLVM' first", | 100 | .msg_compile_fail = "fix 'perf test LLVM' first", |
102 | "libbpf error when dealing with relocation", | 101 | .msg_load_fail = "libbpf error when dealing with relocation", |
103 | NULL, | ||
104 | 0, | ||
105 | false, | ||
106 | }, | 102 | }, |
107 | }; | 103 | }; |
108 | 104 | ||
@@ -167,7 +163,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), | |||
167 | goto out_delete_evlist; | 163 | goto out_delete_evlist; |
168 | } | 164 | } |
169 | 165 | ||
170 | err = perf_evlist__mmap(evlist, opts.mmap_pages, false); | 166 | err = perf_evlist__mmap(evlist, opts.mmap_pages); |
171 | if (err < 0) { | 167 | if (err < 0) { |
172 | pr_debug("perf_evlist__mmap: %s\n", | 168 | pr_debug("perf_evlist__mmap: %s\n", |
173 | str_error_r(errno, sbuf, sizeof(sbuf))); | 169 | str_error_r(errno, sbuf, sizeof(sbuf))); |
@@ -190,7 +186,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), | |||
190 | } | 186 | } |
191 | 187 | ||
192 | if (count != expect) { | 188 | if (count != expect) { |
193 | pr_debug("BPF filter result incorrect\n"); | 189 | pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count); |
194 | goto out_delete_evlist; | 190 | goto out_delete_evlist; |
195 | } | 191 | } |
196 | 192 | ||
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 766573e236e4..fafa014240cd 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -411,9 +411,9 @@ static const char *shell_test__description(char *description, size_t size, | |||
411 | return description ? trim(description + 1) : NULL; | 411 | return description ? trim(description + 1) : NULL; |
412 | } | 412 | } |
413 | 413 | ||
414 | #define for_each_shell_test(dir, ent) \ | 414 | #define for_each_shell_test(dir, base, ent) \ |
415 | while ((ent = readdir(dir)) != NULL) \ | 415 | while ((ent = readdir(dir)) != NULL) \ |
416 | if (ent->d_type == DT_REG && ent->d_name[0] != '.') | 416 | if (!is_directory(base, ent)) |
417 | 417 | ||
418 | static const char *shell_tests__dir(char *path, size_t size) | 418 | static const char *shell_tests__dir(char *path, size_t size) |
419 | { | 419 | { |
@@ -452,7 +452,7 @@ static int shell_tests__max_desc_width(void) | |||
452 | if (!dir) | 452 | if (!dir) |
453 | return -1; | 453 | return -1; |
454 | 454 | ||
455 | for_each_shell_test(dir, ent) { | 455 | for_each_shell_test(dir, path, ent) { |
456 | char bf[256]; | 456 | char bf[256]; |
457 | const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); | 457 | const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); |
458 | 458 | ||
@@ -504,7 +504,7 @@ static int run_shell_tests(int argc, const char *argv[], int i, int width) | |||
504 | if (!dir) | 504 | if (!dir) |
505 | return -1; | 505 | return -1; |
506 | 506 | ||
507 | for_each_shell_test(dir, ent) { | 507 | for_each_shell_test(dir, st.dir, ent) { |
508 | int curr = i++; | 508 | int curr = i++; |
509 | char desc[256]; | 509 | char desc[256]; |
510 | struct test test = { | 510 | struct test test = { |
@@ -614,7 +614,7 @@ static int perf_test__list_shell(int argc, const char **argv, int i) | |||
614 | if (!dir) | 614 | if (!dir) |
615 | return -1; | 615 | return -1; |
616 | 616 | ||
617 | for_each_shell_test(dir, ent) { | 617 | for_each_shell_test(dir, path, ent) { |
618 | int curr = i++; | 618 | int curr = i++; |
619 | char bf[256]; | 619 | char bf[256]; |
620 | struct test t = { | 620 | struct test t = { |
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index fcc8984bc329..3bf7b145b826 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -639,7 +639,7 @@ static int do_test_code_reading(bool try_kcore) | |||
639 | break; | 639 | break; |
640 | } | 640 | } |
641 | 641 | ||
642 | ret = perf_evlist__mmap(evlist, UINT_MAX, false); | 642 | ret = perf_evlist__mmap(evlist, UINT_MAX); |
643 | if (ret < 0) { | 643 | if (ret < 0) { |
644 | pr_debug("perf_evlist__mmap failed\n"); | 644 | pr_debug("perf_evlist__mmap failed\n"); |
645 | goto out_put; | 645 | goto out_put; |
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c index ac40e05bcab4..260418969120 100644 --- a/tools/perf/tests/dwarf-unwind.c +++ b/tools/perf/tests/dwarf-unwind.c | |||
@@ -173,6 +173,7 @@ int test__dwarf_unwind(struct test *test __maybe_unused, int subtest __maybe_unu | |||
173 | } | 173 | } |
174 | 174 | ||
175 | callchain_param.record_mode = CALLCHAIN_DWARF; | 175 | callchain_param.record_mode = CALLCHAIN_DWARF; |
176 | dwarf_callchain_users = true; | ||
176 | 177 | ||
177 | if (init_live_machine(machine)) { | 178 | if (init_live_machine(machine)) { |
178 | pr_err("Could not init machine\n"); | 179 | pr_err("Could not init machine\n"); |
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c index 842d33637a18..c46530918938 100644 --- a/tools/perf/tests/keep-tracking.c +++ b/tools/perf/tests/keep-tracking.c | |||
@@ -95,7 +95,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un | |||
95 | goto out_err; | 95 | goto out_err; |
96 | } | 96 | } |
97 | 97 | ||
98 | CHECK__(perf_evlist__mmap(evlist, UINT_MAX, false)); | 98 | CHECK__(perf_evlist__mmap(evlist, UINT_MAX)); |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * First, test that a 'comm' event can be found when the event is | 101 | * First, test that a 'comm' event can be found when the event is |
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 5a8bf318f8a7..c0e971da965c 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c | |||
@@ -94,7 +94,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse | |||
94 | expected_nr_events[i] = 1 + rand() % 127; | 94 | expected_nr_events[i] = 1 + rand() % 127; |
95 | } | 95 | } |
96 | 96 | ||
97 | if (perf_evlist__mmap(evlist, 128, true) < 0) { | 97 | if (perf_evlist__mmap(evlist, 128) < 0) { |
98 | pr_debug("failed to mmap events: %d (%s)\n", errno, | 98 | pr_debug("failed to mmap events: %d (%s)\n", errno, |
99 | str_error_r(errno, sbuf, sizeof(sbuf))); | 99 | str_error_r(errno, sbuf, sizeof(sbuf))); |
100 | goto out_delete_evlist; | 100 | goto out_delete_evlist; |
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index d9619d265314..43519267b93b 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c | |||
@@ -1,5 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <linux/err.h> | 2 | #include <linux/err.h> |
3 | #include <sys/types.h> | ||
4 | #include <sys/stat.h> | ||
5 | #include <fcntl.h> | ||
3 | #include "perf.h" | 6 | #include "perf.h" |
4 | #include "evlist.h" | 7 | #include "evlist.h" |
5 | #include "evsel.h" | 8 | #include "evsel.h" |
@@ -64,7 +67,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest | |||
64 | goto out_delete_evlist; | 67 | goto out_delete_evlist; |
65 | } | 68 | } |
66 | 69 | ||
67 | err = perf_evlist__mmap(evlist, UINT_MAX, false); | 70 | err = perf_evlist__mmap(evlist, UINT_MAX); |
68 | if (err < 0) { | 71 | if (err < 0) { |
69 | pr_debug("perf_evlist__mmap: %s\n", | 72 | pr_debug("perf_evlist__mmap: %s\n", |
70 | str_error_r(errno, sbuf, sizeof(sbuf))); | 73 | str_error_r(errno, sbuf, sizeof(sbuf))); |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index f0679613bd18..18b06444f230 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/hw_breakpoint.h> | 15 | #include <linux/hw_breakpoint.h> |
16 | #include <api/fs/fs.h> | ||
17 | #include <api/fs/tracing_path.h> | 16 | #include <api/fs/tracing_path.h> |
18 | 17 | ||
19 | #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \ | 18 | #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \ |
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index c34904d37705..0afafab85238 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c | |||
@@ -141,7 +141,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus | |||
141 | * fds in the same CPU to be injected in the same mmap ring buffer | 141 | * fds in the same CPU to be injected in the same mmap ring buffer |
142 | * (using ioctl(PERF_EVENT_IOC_SET_OUTPUT)). | 142 | * (using ioctl(PERF_EVENT_IOC_SET_OUTPUT)). |
143 | */ | 143 | */ |
144 | err = perf_evlist__mmap(evlist, opts.mmap_pages, false); | 144 | err = perf_evlist__mmap(evlist, opts.mmap_pages); |
145 | if (err < 0) { | 145 | if (err < 0) { |
146 | pr_debug("perf_evlist__mmap: %s\n", | 146 | pr_debug("perf_evlist__mmap: %s\n", |
147 | str_error_r(errno, sbuf, sizeof(sbuf))); | 147 | str_error_r(errno, sbuf, sizeof(sbuf))); |
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 3ec6302b6498..0e2d00d69e6e 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c | |||
@@ -248,7 +248,7 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format) | |||
248 | event->header.size = sz; | 248 | event->header.size = sz; |
249 | 249 | ||
250 | err = perf_event__synthesize_sample(event, sample_type, read_format, | 250 | err = perf_event__synthesize_sample(event, sample_type, read_format, |
251 | &sample, false); | 251 | &sample); |
252 | if (err) { | 252 | if (err) { |
253 | pr_debug("%s failed for sample_type %#"PRIx64", error %d\n", | 253 | pr_debug("%s failed for sample_type %#"PRIx64", error %d\n", |
254 | "perf_event__synthesize_sample", sample_type, err); | 254 | "perf_event__synthesize_sample", sample_type, err); |
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh index 2a9ef080efd0..55ad9793d544 100755 --- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh +++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh | |||
@@ -17,10 +17,9 @@ skip_if_no_perf_probe || exit 2 | |||
17 | file=$(mktemp /tmp/temporary_file.XXXXX) | 17 | file=$(mktemp /tmp/temporary_file.XXXXX) |
18 | 18 | ||
19 | trace_open_vfs_getname() { | 19 | trace_open_vfs_getname() { |
20 | test "$(uname -m)" = s390x && { svc="openat"; txt="dfd: +CWD, +"; } | 20 | evts=$(echo $(perf list syscalls:sys_enter_open* |& egrep 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/') |
21 | 21 | perf trace -e $evts touch $file 2>&1 | \ | |
22 | perf trace -e ${svc:-open} touch $file 2>&1 | \ | 22 | egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$" |
23 | egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ ${svc:-open}\(${txt}filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$" | ||
24 | } | 23 | } |
25 | 24 | ||
26 | 25 | ||
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 725a196991a8..f6c72f915d48 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c | |||
@@ -78,7 +78,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) | |||
78 | goto out_delete_evlist; | 78 | goto out_delete_evlist; |
79 | } | 79 | } |
80 | 80 | ||
81 | err = perf_evlist__mmap(evlist, 128, true); | 81 | err = perf_evlist__mmap(evlist, 128); |
82 | if (err < 0) { | 82 | if (err < 0) { |
83 | pr_debug("failed to mmap event: %d (%s)\n", errno, | 83 | pr_debug("failed to mmap event: %d (%s)\n", errno, |
84 | str_error_r(errno, sbuf, sizeof(sbuf))); | 84 | str_error_r(errno, sbuf, sizeof(sbuf))); |
diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c index 7d3f4bf9534f..33e00295a972 100644 --- a/tools/perf/tests/switch-tracking.c +++ b/tools/perf/tests/switch-tracking.c | |||
@@ -449,7 +449,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_ | |||
449 | goto out; | 449 | goto out; |
450 | } | 450 | } |
451 | 451 | ||
452 | err = perf_evlist__mmap(evlist, UINT_MAX, false); | 452 | err = perf_evlist__mmap(evlist, UINT_MAX); |
453 | if (err) { | 453 | if (err) { |
454 | pr_debug("perf_evlist__mmap failed!\n"); | 454 | pr_debug("perf_evlist__mmap failed!\n"); |
455 | goto out_err; | 455 | goto out_err; |
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 89c8e1604ca7..01b62b81751b 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c | |||
@@ -101,7 +101,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused | |||
101 | goto out_delete_evlist; | 101 | goto out_delete_evlist; |
102 | } | 102 | } |
103 | 103 | ||
104 | if (perf_evlist__mmap(evlist, 128, true) < 0) { | 104 | if (perf_evlist__mmap(evlist, 128) < 0) { |
105 | pr_debug("failed to mmap events: %d (%s)\n", errno, | 105 | pr_debug("failed to mmap events: %d (%s)\n", errno, |
106 | str_error_r(errno, sbuf, sizeof(sbuf))); | 106 | str_error_r(errno, sbuf, sizeof(sbuf))); |
107 | goto out_delete_evlist; | 107 | goto out_delete_evlist; |
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c index dbcb6a19b375..4de1939b58ba 100644 --- a/tools/perf/tests/thread-map.c +++ b/tools/perf/tests/thread-map.c | |||
@@ -105,7 +105,7 @@ int test__thread_map_remove(struct test *test __maybe_unused, int subtest __mayb | |||
105 | TEST_ASSERT_VAL("failed to allocate map string", | 105 | TEST_ASSERT_VAL("failed to allocate map string", |
106 | asprintf(&str, "%d,%d", getpid(), getppid()) >= 0); | 106 | asprintf(&str, "%d,%d", getpid(), getppid()) >= 0); |
107 | 107 | ||
108 | threads = thread_map__new_str(str, NULL, 0); | 108 | threads = thread_map__new_str(str, NULL, 0, false); |
109 | 109 | ||
110 | TEST_ASSERT_VAL("failed to allocate thread_map", | 110 | TEST_ASSERT_VAL("failed to allocate thread_map", |
111 | threads); | 111 | threads); |