diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-02-25 10:52:49 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 13:05:59 -0300 |
commit | 097c87582c5719adbd8b700f4250e1f1d9f15ebf (patch) | |
tree | f80988db8e0ac71b8396412d45ee757b4bc440ff /tools/perf/tests/attr.c | |
parent | 66857b5a8bc61b0c5e7a9c96f02558ef6d4109c6 (diff) | |
download | linux-097c87582c5719adbd8b700f4250e1f1d9f15ebf.tar.bz2 |
perf tests: Make attr script verbose friendly
Making the attr test script runner to pass proper verbose option. Also
making single '-v' be more reader friendly and display just the test
name.
Making the current output to be display for '-vv'.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1361785972-7431-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/attr.c')
-rw-r--r-- | tools/perf/tests/attr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index bdcceb886f77..038de3ecb8cb 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c @@ -147,10 +147,15 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, static int run_dir(const char *d, const char *perf) { + char v[] = "-vvvvv"; + int vcnt = min(verbose, (int) sizeof(v) - 1); char cmd[3*PATH_MAX]; - snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s", - d, d, perf, verbose ? "-v" : ""); + if (verbose) + vcnt++; + + snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s", + d, d, perf, vcnt, v); return system(cmd); } |