aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/perf-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/perf-record.c')
-rw-r--r--tools/perf/tests/perf-record.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index 34394cc05077..07f6bd8ed719 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -58,6 +58,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
58 char *bname, *mmap_filename; 58 char *bname, *mmap_filename;
59 u64 prev_time = 0; 59 u64 prev_time = 0;
60 bool found_cmd_mmap = false, 60 bool found_cmd_mmap = false,
61 found_coreutils_mmap = false,
61 found_libc_mmap = false, 62 found_libc_mmap = false,
62 found_vdso_mmap = false, 63 found_vdso_mmap = false,
63 found_ld_mmap = false; 64 found_ld_mmap = false;
@@ -254,6 +255,8 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
254 if (bname != NULL) { 255 if (bname != NULL) {
255 if (!found_cmd_mmap) 256 if (!found_cmd_mmap)
256 found_cmd_mmap = !strcmp(bname + 1, cmd); 257 found_cmd_mmap = !strcmp(bname + 1, cmd);
258 if (!found_coreutils_mmap)
259 found_coreutils_mmap = !strcmp(bname + 1, "coreutils");
257 if (!found_libc_mmap) 260 if (!found_libc_mmap)
258 found_libc_mmap = !strncmp(bname + 1, "libc", 4); 261 found_libc_mmap = !strncmp(bname + 1, "libc", 4);
259 if (!found_ld_mmap) 262 if (!found_ld_mmap)
@@ -292,7 +295,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
292 } 295 }
293 296
294found_exit: 297found_exit:
295 if (nr_events[PERF_RECORD_COMM] > 1) { 298 if (nr_events[PERF_RECORD_COMM] > 1 + !!found_coreutils_mmap) {
296 pr_debug("Excessive number of PERF_RECORD_COMM events!\n"); 299 pr_debug("Excessive number of PERF_RECORD_COMM events!\n");
297 ++errs; 300 ++errs;
298 } 301 }
@@ -302,7 +305,7 @@ found_exit:
302 ++errs; 305 ++errs;
303 } 306 }
304 307
305 if (!found_cmd_mmap) { 308 if (!found_cmd_mmap && !found_coreutils_mmap) {
306 pr_debug("PERF_RECORD_MMAP for %s missing!\n", cmd); 309 pr_debug("PERF_RECORD_MMAP for %s missing!\n", cmd);
307 ++errs; 310 ++errs;
308 } 311 }