From 81f8d97b3486928048bb8ad701b4af62ddce9901 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 3 Jan 2019 09:51:34 +0100 Subject: tests: treat all signals as error Previously we were only treating SIGSEGV as error though there is no reason to treat other signals as success and they may hide an actual error case (e.g., when SIGPIPE is received). With this change we treat any signals received by the child except SIGTERM as error, and we ensure that SIGPIPE is ignored in all tests. This also updates tests/slow/cipher-api-test.c to test failures with SIGABRT or otherwise consistently. Signed-off-by: Nikos Mavrogiannopoulos --- tests/utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/utils.h') diff --git a/tests/utils.h b/tests/utils.h index b905065c52..e5728374fa 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -24,6 +24,7 @@ #define UTILS_H #include +#include #include #include #include @@ -148,7 +149,7 @@ inline static void _check_wait_status(int status, unsigned sigonly) { #if defined WEXITSTATUS && defined WIFSIGNALED if (WEXITSTATUS(status) != 0 || - (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV)) { + (WIFSIGNALED(status) && WTERMSIG(status) != SIGTERM)) { if (WIFSIGNALED(status)) { fail("Child died with signal %d\n", WTERMSIG(status)); } else { -- cgit v1.2.1