summaryrefslogtreecommitdiffstats
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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index bdcceb886f7..00218f503b2 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);
}
@@ -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;
}