From: Benjamin Berg Date: Wed, 9 Jul 2025 15:55:10 +0000 (+0200) Subject: selftests/nolibc: show failed run if test process crashes X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=750aef513c610a37a13732ec64902428b839715e;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20250709155512.971080-2-benjamin@sipsolutions.net [Thomas: fix patch prefix] Signed-off-by: Thomas Weißschuh --- diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc index 8cb65392fa105..51ba853dd97ee 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: