perf test: Fixup for the die() removal
authorNamhyung Kim <[email protected]>
Wed, 12 Sep 2012 02:11:05 +0000 (11:11 +0900)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 14 Sep 2012 18:48:27 +0000 (15:48 -0300)
The commit 32c7f7383a09 ("perf test: Remove die() calls") replaced die()
call to pr_debug + return -1, but it should be pr_err otherwise it'll
not show up unless -v option is given.  Fix it.

Signed-off-by: Namhyung Kim <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-test.c

index d33143efefcec91bea798642bfb1563ee556774e..4aed1553db56a30309574d7edbf863f12b17a4dc 100644 (file)
@@ -1026,15 +1026,15 @@ static int __test__rdpmc(void)
 
        fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
        if (fd < 0) {
-               pr_debug("Error: sys_perf_event_open() syscall returned "
-                        "with %d (%s)\n", fd, strerror(errno));
+               pr_err("Error: sys_perf_event_open() syscall returned "
+                      "with %d (%s)\n", fd, strerror(errno));
                return -1;
        }
 
        addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
        if (addr == (void *)(-1)) {
-               pr_debug("Error: mmap() syscall returned with (%s)\n",
-                        strerror(errno));
+               pr_err("Error: mmap() syscall returned with (%s)\n",
+                      strerror(errno));
                goto out_close;
        }