From d4f039a326f4758e48bf5bdfa0ade9cb11014f97 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 23 Apr 2026 13:56:13 +0200 Subject: [PATCH 1/3] ctest: fix tests when compiling with sanitizers When compiling with sanitizers that require LD_LIBRARY_PATH (see documentation), ctest could not drive tests as the executables did not find shared objects. Fix the directory to the current build directory to enable running with sanitizers. Signed-off-by: Robert Schmidt --- openair1/SIMULATION/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 2235cd2771..65bb102874 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -39,7 +39,7 @@ function(add_physim_test test_name test_description test_exec) # pass test description also through environment variable: for cmake < 3.30, # in JSON export, we cannot recover the description otherwise # see also https://gitlab.kitware.com/cmake/cmake/-/issues/21490 - ENVIRONMENT "LD_LIBRARY_PATH=.;TEST_DESCRIPTION=${test_description}" + ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR};TEST_DESCRIPTION=${test_description}" ) set_tests_properties(${test_name} PROPERTIES CHECK_COUNT 0) add_dependencies(tests ${test_exec}) From b0f63bf83c4a47a0349575a42c616ee0dc202af5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 23 Apr 2026 13:57:45 +0200 Subject: [PATCH 2/3] .gitignore: ignore build directories Signed-off-by: Robert Schmidt --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0733b4c180..1d7b0a06a4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ cmake_targets/*/build/ cmake_targets/ran_build/ log/ lte_build_oai/ +build* # IDE files .vscode From 74bc9bf0ccefd96dad7a2e12de20581a6227894e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 23 Apr 2026 14:31:51 +0200 Subject: [PATCH 3/3] spsc_q: fix use of stdatomic.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stdatomic.h is a C++23 feature [1]. Thus, "older" compilers such as gcc-11 (default in Ubuntu 22) do not know this, and can therefore not correctly compile spsc_q. Fix this by alternatively including atomic for C++. Fixes errors such as stdatomic.h:40:9: error: ‘_Atomic’ does not name a type [1] https://en.cppreference.com/cpp/header/stdatomic.h Signed-off-by: Robert Schmidt --- common/utils/ds/spsc_q.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/utils/ds/spsc_q.h b/common/utils/ds/spsc_q.h index 7fd968b2f0..1149a80f7d 100644 --- a/common/utils/ds/spsc_q.h +++ b/common/utils/ds/spsc_q.h @@ -7,11 +7,13 @@ #include #include -#include #if defined(__cplusplus) +#include // use atomic_size_t to help interworking with C++ using std::atomic_size_t; +#else +#include #endif typedef struct spsc_q {