lkml.org 
[lkml]   [2014]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 10/11] perf, tools, test: Add test case for alias and JSON parsing
On Sun, Jul 13, 2014 at 01:49:59AM +0200, Andi Kleen wrote:
> > missing the tests/aliases.o file
> >
> > AR libperf.a
> > ar: tests/aliases.o: No such file or directory
>
> Fixed here (and in git)

got it, would you be ok with following change?
using pr_* instead of fprintf calls..

jirka


---
diff --git a/tools/perf/tests/aliases.c b/tools/perf/tests/aliases.c
index 08a5f01..f315fbc 100644
--- a/tools/perf/tests/aliases.c
+++ b/tools/perf/tests/aliases.c
@@ -25,7 +25,7 @@ static int test__event(const char *pmu, const char *name)
* We only print on failure because common perf setups
* have events that cannot be parsed.
*/
- fprintf(stderr, "invalid or unsupported event: '%s'\n", name);
+ pr_err("invalid or unsupported event: '%s'\n", name);
ret = 0;
failed++;
} else
@@ -42,7 +42,7 @@ int test__aliases(void)
/* For now user must manually download */
if (0 && system("perf download > /dev/null") < 0) {
/* Don't error out for this for now */
- fprintf(stderr, "perf download failed\n");
+ pr_err("perf download failed\n");
}

evlist = perf_evlist__new();
@@ -50,9 +50,9 @@ int test__aliases(void)
return -ENOMEM;

err = pmu_iterate_events(test__event);
- fprintf(stderr, " Parsed %d events :", num_events);
+ pr_debug(" Parsed %d events :", num_events);
if (failed > 0)
- pr_debug(" %d events failed", failed);
+ pr_err(" %d events failed", failed);
perf_evlist__delete(evlist);
return err;
}

\
 
 \ /
  Last update: 2014-07-13 23:01    [W:0.311 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site