diff options
-rw-r--r-- | tools/perf/tests/builtin-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 3ccfd58a8c3c..436e22993909 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -465,10 +465,12 @@ static int perf_test__list(int argc, const char **argv) int i = 0; for_each_test(j, t) { + ++i; + if (argc > 1 && !strstr(t->desc, argv[1])) continue; - pr_info("%2d: %s\n", ++i, t->desc); + pr_info("%2d: %s\n", i, t->desc); } return 0; |