Re: [PATCH 10/11] perf, tools, test: Add test case for alias and JSON parsing

From: Jiri Olsa
Date: Sun Jul 13 2014 - 16:10:52 EST


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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/