perf test: Remove die() calls

Just use pr_err() + return -1 and let the other tests run as well and
then the perf's main() exit doing whatever it needs.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-n5ahw26e94klmde9cz6rxsdf@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d5cb2aef
...@@ -1023,14 +1023,16 @@ static int __test__rdpmc(void) ...@@ -1023,14 +1023,16 @@ static int __test__rdpmc(void)
fd = sys_perf_event_open(&attr, 0, -1, -1, 0); fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
if (fd < 0) { if (fd < 0) {
die("Error: sys_perf_event_open() syscall returned " pr_debug("Error: sys_perf_event_open() syscall returned "
"with %d (%s)\n", fd, strerror(errno)); "with %d (%s)\n", fd, strerror(errno));
return -1;
} }
addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0); addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
if (addr == (void *)(-1)) { if (addr == (void *)(-1)) {
die("Error: mmap() syscall returned " pr_debug("Error: mmap() syscall returned with (%s)\n",
"with (%s)\n", strerror(errno)); strerror(errno));
goto out_close;
} }
for (n = 0; n < 6; n++) { for (n = 0; n < 6; n++) {
...@@ -1051,9 +1053,9 @@ static int __test__rdpmc(void) ...@@ -1051,9 +1053,9 @@ static int __test__rdpmc(void)
} }
munmap(addr, page_size); munmap(addr, page_size);
close(fd);
pr_debug(" "); pr_debug(" ");
out_close:
close(fd);
if (!delta_sum) if (!delta_sum)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment