Skip to content

Commit 2b7b78e

Browse files
captain5050namhyung
authored andcommitted
perf test: Send list output to stdout rather than stderr
Follow the workload listing in using stdout rather than stderr. Correct the numbering of sub-tests to be 1.1 rather than 1:1. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Cc: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250110045736.598281-3-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent 2e47c50 commit 2b7b78e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/perf/tests/builtin-test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static int __cmd_test(struct test_suite **suites, int argc, const char *argv[],
579579
return err;
580580
}
581581

582-
static int perf_test__list(struct test_suite **suites, int argc, const char **argv)
582+
static int perf_test__list(FILE *fp, struct test_suite **suites, int argc, const char **argv)
583583
{
584584
int curr_suite = 0;
585585

@@ -589,13 +589,13 @@ static int perf_test__list(struct test_suite **suites, int argc, const char **ar
589589
if (!perf_test__matches(test_description(*t, -1), curr_suite, argc, argv))
590590
continue;
591591

592-
pr_info("%3d: %s\n", curr_suite + 1, test_description(*t, -1));
592+
fprintf(fp, "%3d: %s\n", curr_suite + 1, test_description(*t, -1));
593593

594594
if (test_suite__num_test_cases(*t) <= 1)
595595
continue;
596596

597597
test_suite__for_each_test_case(*t, curr_test_case) {
598-
pr_info("%3d:%1d: %s\n", curr_suite + 1, curr_test_case + 1,
598+
fprintf(fp, "%3d.%1d: %s\n", curr_suite + 1, curr_test_case + 1,
599599
test_description(*t, curr_test_case));
600600
}
601601
}
@@ -721,7 +721,7 @@ int cmd_test(int argc, const char **argv)
721721
argc = parse_options_subcommand(argc, argv, test_options, test_subcommands, test_usage, 0);
722722
if (argc >= 1 && !strcmp(argv[0], "list")) {
723723
suites = build_suites();
724-
ret = perf_test__list(suites, argc - 1, argv + 1);
724+
ret = perf_test__list(stdout, suites, argc - 1, argv + 1);
725725
free(suites);
726726
return ret;
727727
}

0 commit comments

Comments
 (0)