From ce47cf59104017f1055460247dd19441fd7bbd87 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 20 Apr 2021 14:34:31 +0100 Subject: [PATCH] fix - re-add log flush to srsran_assert --- lib/include/srsran/common/srsran_assert.h | 5 ++--- lib/test/common/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/include/srsran/common/srsran_assert.h b/lib/include/srsran/common/srsran_assert.h index 8fd22cdc3..aaad80874 100644 --- a/lib/include/srsran/common/srsran_assert.h +++ b/lib/include/srsran/common/srsran_assert.h @@ -20,6 +20,7 @@ #define srsran_terminate(fmt, ...) \ std::fprintf(stderr, "%s:%d: " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \ + srslog::flush(); \ std::abort() #ifdef ASSERTS_ENABLED @@ -60,9 +61,7 @@ do { \ } while (0) -#define srsran_expect(condition, fmt, ...) \ - do { \ - } while (0) +#define srsran_expect(condition, fmt, ...) srsran_assert(condition, fmt, ##__VA_ARGS__) #endif diff --git a/lib/test/common/CMakeLists.txt b/lib/test/common/CMakeLists.txt index adf5eeb34..4ea720a21 100644 --- a/lib/test/common/CMakeLists.txt +++ b/lib/test/common/CMakeLists.txt @@ -46,6 +46,7 @@ add_executable(bcd_helpers_test bcd_helpers_test.cc) target_link_libraries(bcd_helpers_test srsran_common) add_executable(stack_procedure_test stack_procedure_test.cc) +target_link_libraries(stack_procedure_test srsran_common) add_test(stack_procedure_test stack_procedure_test) add_executable(queue_test multiqueue_test.cc)