aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/runner.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.c b/tests/runner.c
index ccf8d46..11470bc 100644
--- a/tests/runner.c
+++ b/tests/runner.c
@@ -27,10 +27,13 @@ int run_test(struct testcase *tc) {
27 } else { 27 } else {
28 /* parent: wait for completion of test */ 28 /* parent: wait for completion of test */
29 SYSCALL( waitpid(pid, &status, 0) ); 29 SYSCALL( waitpid(pid, &status, 0) );
30 if (WEXITSTATUS(status) == 0) 30 if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
31 printf("ok.\n"); 31 printf("ok.\n");
32 else if (WIFSIGNALED(status)) {
33 printf("failed (%s)!\n", strsignal(WTERMSIG(status)));
34 }
32 } 35 }
33 return WEXITSTATUS(status) == 0; 36 return WIFEXITED(status) && WEXITSTATUS(status) == 0;
34} 37}
35 38
36int run_tests(int* testidx, int num_tests, const char* plugin) 39int run_tests(int* testidx, int num_tests, const char* plugin)