diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-02-25 04:52:49 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 12:05:59 -0400 |
commit | 097c87582c5719adbd8b700f4250e1f1d9f15ebf (patch) | |
tree | f80988db8e0ac71b8396412d45ee757b4bc440ff /tools | |
parent | 66857b5a8bc61b0c5e7a9c96f02558ef6d4109c6 (diff) |
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')
-rw-r--r-- | tools/perf/tests/attr.c | 9 | ||||
-rw-r--r-- | tools/perf/tests/attr.py | 4 |
2 files changed, 9 insertions, 4 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, | |||
147 | 147 | ||
148 | static int run_dir(const char *d, const char *perf) | 148 | static int run_dir(const char *d, const char *perf) |
149 | { | 149 | { |
150 | char v[] = "-vvvvv"; | ||
151 | int vcnt = min(verbose, (int) sizeof(v) - 1); | ||
150 | char cmd[3*PATH_MAX]; | 152 | char cmd[3*PATH_MAX]; |
151 | 153 | ||
152 | snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s", | 154 | if (verbose) |
153 | d, d, perf, verbose ? "-v" : ""); | 155 | vcnt++; |
156 | |||
157 | snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s", | ||
158 | d, d, perf, vcnt, v); | ||
154 | 159 | ||
155 | return system(cmd); | 160 | return system(cmd); |
156 | } | 161 | } |
diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py index 2f629ca485bc..e0ea51335e9c 100644 --- a/tools/perf/tests/attr.py +++ b/tools/perf/tests/attr.py | |||
@@ -121,7 +121,7 @@ class Test(object): | |||
121 | parser = ConfigParser.SafeConfigParser() | 121 | parser = ConfigParser.SafeConfigParser() |
122 | parser.read(path) | 122 | parser.read(path) |
123 | 123 | ||
124 | log.debug("running '%s'" % path) | 124 | log.warning("running '%s'" % path) |
125 | 125 | ||
126 | self.path = path | 126 | self.path = path |
127 | self.test_dir = options.test_dir | 127 | self.test_dir = options.test_dir |
@@ -172,7 +172,7 @@ class Test(object): | |||
172 | self.perf, self.command, tempdir, self.args) | 172 | self.perf, self.command, tempdir, self.args) |
173 | ret = os.WEXITSTATUS(os.system(cmd)) | 173 | ret = os.WEXITSTATUS(os.system(cmd)) |
174 | 174 | ||
175 | log.warning(" running '%s' ret %d " % (cmd, ret)) | 175 | log.info(" '%s' ret %d " % (cmd, ret)) |
176 | 176 | ||
177 | if ret != int(self.ret): | 177 | if ret != int(self.ret): |
178 | raise Unsup(self) | 178 | raise Unsup(self) |