1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
From 9fb0b5050e58cc0c8806e70a94478900c886487f Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Thu, 12 Feb 2026 16:40:47 +0100
Subject: [PATCH 1/3] Fix build with SYSTEMD enabled, and fix another zlib
underlink in tests
---
src/console/logstorage/CMakeLists.txt | 7 +------
tests/CMakeLists.txt | 8 ++++----
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/console/logstorage/CMakeLists.txt b/src/console/logstorage/CMakeLists.txt
index d5fc29311..aa0fc4aa7 100644
--- a/src/console/logstorage/CMakeLists.txt
+++ b/src/console/logstorage/CMakeLists.txt
@@ -17,6 +17,7 @@ add_definitions(-Werror)
set(dlt-logstorage-ctrl_SRCS
dlt-logstorage-ctrl.c
dlt-logstorage-common.c
+ ${systemd_SRCS}
dlt-logstorage-list.c)
if(WITH_DLT_LOGSTORAGE_CTRL_UDEV)
@@ -26,12 +27,6 @@ if(WITH_DLT_LOGSTORAGE_CTRL_UDEV)
set(LOGSTORAGE_LIBRARY udev)
endif()
-if(WITH_SYSTEMD)
- set(dlt-logstorage-ctrl_SRCS
- ${dlt-logstorage-ctrl_SRCS}
- ${PROJECT_SOURCE_DIR}/systemd/3rdparty/sd-daemon.c)
-endif()
-
add_executable(dlt-logstorage-ctrl
${dlt-logstorage-ctrl_SRCS}
${dlt_control_common_SRCS})
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9385b3c5e..1642344ce 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -33,9 +33,9 @@ endif()
if(WITH_SYSTEMD)
set(SYSTEMD_LIBS systemd)
endif(WITH_SYSTEMD)
-set(DLT_LIBRARIES dlt ${GTEST_LIBS} ${LIBRARIES})
-set(DLT_DAEMON_LIBRARIES dlt_daemon ${GTEST_LIBS} ${LIBRARIES} ${SYSTEMD_LIBS})
-set(DLT_CONTROL_LIBRARIES dlt dlt_control_common_lib ${GTEST_LIBS})
+set(DLT_LIBRARIES dlt ${GTEST_LIBS} ${LIBRARIES} ${SYSTEMD_LIBS} ${ZLIB_LIBRARY})
+set(DLT_DAEMON_LIBRARIES dlt_daemon ${GTEST_LIBS} ${LIBRARIES} ${SYSTEMD_LIBS} ${ZLIB_LIBRARY})
+set(DLT_CONTROL_LIBRARIES dlt dlt_control_common_lib ${GTEST_LIBS} ${SYSTEMD_LIBS} ${ZLIB_LIBRARY})
# Receiver used for QTs. add_test() is not required
add_executable(dlt_test_receiver dlt_test_receiver.c)
@@ -177,7 +177,7 @@ endif()
foreach(target IN LISTS TARGET_LIST)
set(target_SRCS ${target}.cpp)
add_executable(${target} ${target_SRCS} ${systemd_SRCS})
- target_link_libraries(${target} ${DLT_DAEMON_LIBRARIES} ${ZLIB_LIBRARY})
+ target_link_libraries(${target} ${DLT_DAEMON_LIBRARIES})
if(WITH_DLT_INSTALLED_TESTS)
install(TARGETS ${target} RUNTIME DESTINATION ${DLT_TEST_DIR})
if(EXISTS ${PROJECT_SOURCE_DIR}/tests/${target}.sh)
From 59e29e2c32eaaff1b20e7327f8099ab93075e5b4 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Thu, 12 Feb 2026 16:41:11 +0100
Subject: [PATCH 2/3] Fix a test for buffer overflow error
---
tests/gtest_dlt_json_filter.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/gtest_dlt_json_filter.cpp b/tests/gtest_dlt_json_filter.cpp
index 6dc35e159..3c71f2248 100644
--- a/tests/gtest_dlt_json_filter.cpp
+++ b/tests/gtest_dlt_json_filter.cpp
@@ -18,7 +18,7 @@ TEST(t_dlt_message_print_ascii_with_json_filter, normal)
/* Get PWD so file can be used*/
char pwd[100];
- char openfile[114];
+ char openfile[123];
/* ignore returned value from getcwd */
if (getcwd(pwd, 100) == NULL) {}
From 927f1ca5a8714cc980acf2063cd468f4df7bda4f Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Thu, 12 Feb 2026 16:41:22 +0100
Subject: [PATCH 3/3] Disable a dltv2 test failing to build, e.g. due to
missing DltFileV2 datatype
---
tests/gtest_dlt_json_filter.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/gtest_dlt_json_filter.cpp b/tests/gtest_dlt_json_filter.cpp
index 3c71f2248..5c6062710 100644
--- a/tests/gtest_dlt_json_filter.cpp
+++ b/tests/gtest_dlt_json_filter.cpp
@@ -68,6 +68,7 @@ TEST(t_dlt_message_print_ascii_with_json_filter, normal)
EXPECT_LE(DLT_RETURN_OK, dlt_file_free(&file, 0));
}
/* Begin Method: dlt_common::dlt_message_print_ascii with json filter*/
+#if 0
TEST(t_dlt_message_print_ascii_with_json_filter_v2, normal)
{
DltFileV2 file;
@@ -125,6 +126,7 @@ TEST(t_dlt_message_print_ascii_with_json_filter_v2, normal)
EXPECT_LE(DLT_RETURN_OK, dlt_file_free_v2(&file, 0));
}
+#endif
TEST(t_dlt_message_print_ascii_with_json_filter, abnormal)
{
/* equal with t_dlt_message_print_ascii */
|