* [PATCH sched_ext/for-7.1] selftests/sched_ext: Show failed test names in summary
@ 2026-03-17 15:13 Cheng-Yang Chou
2026-03-17 17:54 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Cheng-Yang Chou @ 2026-03-17 15:13 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911
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>
---
tools/testing/selftests/sched_ext/runner.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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;
}
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH sched_ext/for-7.1] selftests/sched_ext: Show failed test names in summary
2026-03-17 15:13 [PATCH sched_ext/for-7.1] selftests/sched_ext: Show failed test names in summary Cheng-Yang Chou
@ 2026-03-17 17:54 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-03-17 17:54 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Emil Tsalapatis, linux-kernel
Hello,
Applied to sched_ext/for-7.1.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-17 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 15:13 [PATCH sched_ext/for-7.1] selftests/sched_ext: Show failed test names in summary Cheng-Yang Chou
2026-03-17 17:54 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.