From d2556ebc3fbc59736863e53f5b2c35e72eb09ae8 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 19 Feb 2024 13:04:34 +0100 Subject: include: Fix wstatus check for assertion tests The macro checks tests for exit code 134 (interrupted by SIGABRT) but not for exit code 6. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- include/ouroboros/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ouroboros') diff --git a/include/ouroboros/test.h b/include/ouroboros/test.h index 6e32579f..a88b5548 100644 --- a/include/ouroboros/test.h +++ b/include/ouroboros/test.h @@ -62,7 +62,7 @@ static int __attribute__((unused)) test_assert_fail(int(* testfunc)(void)) waitpid(pid, &wstatus, 0); #ifdef CONFIG_OUROBOROS_DEBUG - if (WIFSIGNALED(wstatus) && wstatus == 134) + if (WIFSIGNALED(wstatus) && (wstatus == 134 || wstatus == 6)) return 0; printf("Process did not abort, status: %d.\n", wstatus); -- cgit v1.2.3