diff options
Diffstat (limited to 'tools/perf/tests/task-exit.c')
-rw-r--r-- | tools/perf/tests/task-exit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 5ff3db318f12..3a8fedef83bc 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c | |||
@@ -42,6 +42,7 @@ int test__task_exit(void) | |||
42 | .uses_mmap = true, | 42 | .uses_mmap = true, |
43 | }; | 43 | }; |
44 | const char *argv[] = { "true", NULL }; | 44 | const char *argv[] = { "true", NULL }; |
45 | char sbuf[STRERR_BUFSIZE]; | ||
45 | 46 | ||
46 | signal(SIGCHLD, sig_handler); | 47 | signal(SIGCHLD, sig_handler); |
47 | 48 | ||
@@ -82,13 +83,14 @@ int test__task_exit(void) | |||
82 | 83 | ||
83 | err = perf_evlist__open(evlist); | 84 | err = perf_evlist__open(evlist); |
84 | if (err < 0) { | 85 | if (err < 0) { |
85 | pr_debug("Couldn't open the evlist: %s\n", strerror(-err)); | 86 | pr_debug("Couldn't open the evlist: %s\n", |
87 | strerror_r(-err, sbuf, sizeof(sbuf))); | ||
86 | goto out_delete_evlist; | 88 | goto out_delete_evlist; |
87 | } | 89 | } |
88 | 90 | ||
89 | if (perf_evlist__mmap(evlist, 128, true) < 0) { | 91 | if (perf_evlist__mmap(evlist, 128, true) < 0) { |
90 | pr_debug("failed to mmap events: %d (%s)\n", errno, | 92 | pr_debug("failed to mmap events: %d (%s)\n", errno, |
91 | strerror(errno)); | 93 | strerror_r(errno, sbuf, sizeof(sbuf))); |
92 | goto out_delete_evlist; | 94 | goto out_delete_evlist; |
93 | } | 95 | } |
94 | 96 | ||
@@ -103,7 +105,7 @@ retry: | |||
103 | } | 105 | } |
104 | 106 | ||
105 | if (!exited || !nr_exit) { | 107 | if (!exited || !nr_exit) { |
106 | poll(evlist->pollfd, evlist->nr_fds, -1); | 108 | perf_evlist__poll(evlist, -1); |
107 | goto retry; | 109 | goto retry; |
108 | } | 110 | } |
109 | 111 | ||