]> 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 bdcceb886f77fc5f8ae91e3d79b2da4ccd11d09c..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);
 }
@@ -173,6 +178,6 @@ int test__attr(void)
            !lstat(path_perf, &st))
                return run_dir(path_dir, path_perf);
 
-       fprintf(stderr, " (ommitted)");
+       fprintf(stderr, " (omitted)");
        return 0;
 }