Skip to content

Commit 750aef5

Browse files
benzeat-8ch
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] [Thomas: fix patch prefix] Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent f6f6be0 commit 750aef5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/nolibc/Makefile.nolibc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ endif
245245
include $(srctree)/tools/scripts/Makefile.include
246246

247247
REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \
248+
/^Total number of errors:/{done++} \
248249
END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \
249-
if (f || !p) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \
250+
if (f || !p || !done) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \
250251
printf("\nSee all results in %s\n", ARGV[1]); }'
251252

252253
help:

0 commit comments

Comments
 (0)