]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/tests/attr.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[linux.git] / tools / perf / tests / attr.c
index e8257326ec6118431c9b331091282ffb8818cf48..00218f503b2e8b73b7243f52b65953fc540ea4f1 100644 (file)
@@ -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);
 }