diff options
author | Ian Rogers <irogers@google.com> | 2025-01-09 20:57:33 -0800 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-01-16 11:01:03 -0800 |
commit | 2b7b78efc8c91430fd81a07d8fb4e0a89456aff8 (patch) | |
tree | c986b041c78758f6c33be61bb4336537415d79b9 /tools | |
parent | 2e47c503deeeadc1bfa66ece7f75e298a814e94f (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index daf52c83b0f9..c6071c4db741 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -579,7 +579,7 @@ err_out: return err; } -static int perf_test__list(struct test_suite **suites, int argc, const char **argv) +static int perf_test__list(FILE *fp, struct test_suite **suites, int argc, const char **argv) { int curr_suite = 0; @@ -589,13 +589,13 @@ static int perf_test__list(struct test_suite **suites, int argc, const char **ar if (!perf_test__matches(test_description(*t, -1), curr_suite, argc, argv)) continue; - pr_info("%3d: %s\n", curr_suite + 1, test_description(*t, -1)); + fprintf(fp, "%3d: %s\n", curr_suite + 1, test_description(*t, -1)); if (test_suite__num_test_cases(*t) <= 1) continue; test_suite__for_each_test_case(*t, curr_test_case) { - pr_info("%3d:%1d: %s\n", curr_suite + 1, curr_test_case + 1, + fprintf(fp, "%3d.%1d: %s\n", curr_suite + 1, curr_test_case + 1, test_description(*t, curr_test_case)); } } @@ -721,7 +721,7 @@ int cmd_test(int argc, const char **argv) argc = parse_options_subcommand(argc, argv, test_options, test_subcommands, test_usage, 0); if (argc >= 1 && !strcmp(argv[0], "list")) { suites = build_suites(); - ret = perf_test__list(suites, argc - 1, argv + 1); + ret = perf_test__list(stdout, suites, argc - 1, argv + 1); free(suites); return ret; } |