diff options
| author | Cheng-Yang Chou <yphbchou0911@gmail.com> | 2026-03-17 18:13:11 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-03-17 20:46:57 +0300 |
| commit | f6689792ffc4bc226636a513f8b0ac7bd45c5091 (patch) | |
| tree | c8f438319ea36098ffaf0913e0363310cc4dfc19 | |
| parent | 2e5e5b3738ddda91b9a7ee9399efa5245c992233 (diff) | |
| download | linux-f6689792ffc4bc226636a513f8b0ac7bd45c5091.tar.xz | |
selftests/sched_ext: Show failed test names in summary
When tests fail, the runner only printed the failure count, making
it hard to tell which tests failed without scrolling through output.
Track failed test names in an array and print them after the summary
so failures are immediately visible at the end of the run.
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | tools/testing/selftests/sched_ext/runner.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/testing/selftests/sched_ext/runner.c b/tools/testing/selftests/sched_ext/runner.c index 90043fd74a60..37ad56c3eb29 100644 --- a/tools/testing/selftests/sched_ext/runner.c +++ b/tools/testing/selftests/sched_ext/runner.c @@ -133,6 +133,7 @@ static bool test_valid(const struct scx_test *test) int main(int argc, char **argv) { const char *filter = NULL; + const char *failed_tests[MAX_SCX_TESTS]; unsigned testnum = 0, i; unsigned passed = 0, skipped = 0, failed = 0; int opt; @@ -201,7 +202,7 @@ int main(int argc, char **argv) skipped++; break; case SCX_TEST_FAIL: - failed++; + failed_tests[failed++] = test->name; break; } } @@ -210,6 +211,11 @@ int main(int argc, char **argv) printf("PASSED: %u\n", passed); printf("SKIPPED: %u\n", skipped); printf("FAILED: %u\n", failed); + if (failed > 0) { + printf("\nFailed tests:\n"); + for (i = 0; i < failed; i++) + printf(" - %s\n", failed_tests[i]); + } return 0; } |
