diff options
| author | Benjamin Berg <benjamin.berg@intel.com> | 2025-07-09 17:55:10 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-07-09 18:28:36 +0200 |
| commit | 750aef513c610a37a13732ec64902428b839715e (patch) | |
| tree | dfba5a3a11417fe03024348ac9dd15c833d9084b | |
| parent | f6f6be0c4faf0e0faa3ed5253458186c2d598226 (diff) | |
selftests/nolibc: show failed run if test process crashes
The logic would not catch if the test process crashes and would
incorrectly report a "success" state. Fix this by looking for the final
"Total number of errors:" message and printing "failure" if it was not
seen.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://lore.kernel.org/r/20250709155512.971080-2-benjamin@sipsolutions.net
[Thomas: fix patch prefix]
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
| -rw-r--r-- | tools/testing/selftests/nolibc/Makefile.nolibc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc index 8cb65392fa10..51ba853dd97e 100644 --- a/tools/testing/selftests/nolibc/Makefile.nolibc +++ b/tools/testing/selftests/nolibc/Makefile.nolibc @@ -245,8 +245,9 @@ endif include $(srctree)/tools/scripts/Makefile.include REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \ + /^Total number of errors:/{done++} \ END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \ - if (f || !p) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \ + if (f || !p || !done) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \ printf("\nSee all results in %s\n", ARGV[1]); }' help: |
