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 --- CMakeLists.txt | 4 ++-- include/ouroboros/test.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6340e55..bc89d2d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ project(ouroboros C) include(GNUInstallDirs) set(PACKAGE_VERSION_MAJOR 0) -set(PACKAGE_VERSION_MINOR 20) -set(PACKAGE_VERSION_PATCH 3) +set(PACKAGE_VERSION_MINOR 21) +set(PACKAGE_VERSION_PATCH 0) set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") set(PACKAGE_DESCRIPTION "The Ouroboros prototype") 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