aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/attr.c')
-rw-r--r--tools/perf/tests/attr.c9
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,
147 147
148static int run_dir(const char *d, const char *perf) 148static 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}