Skip to content

Commit 4ed1b97

Browse files
lvklevankhanhssugiuraFelix Herrmannmdangersthanhbnq
authored
Logstorage changes (#525)
* lib: Introduce WITH_LIB_NO_VERSION cmake option Signed-off By: Saya Sugiura <[email protected]> * logstorage: optional index and stop mode adds options to imitate libdlt file logging with offlinelogstorage: - optional index when NOFiles == 1 e.g.: APID.dlt - disable ringbuffer for specific filters: OverwriteBehavior=DISCARD_NEW this stops the automatic removal of the oldest messages. Also contains: - some fixes for memcheck findings about usage of uninitialized memory. - cmake coverage target and option can be used to generate a html report about the code coverage by the ctest tests. Signed-off-by: Felix Herrmann <[email protected]> * logstorage: Open file on correct cache size In case of ON_SPECIFIC_SIZE sync strategy, the file was not opened on correct cache size, so the file size was smaller than defined even next log messages can fit there. Signed-off-by: Saya Sugiura <[email protected]> * logstorage: Test all sync strategies All sync strategies are verified in logstorage component test. To make it work, following adaptions are also done: - dlt-logstorage-control: Add option to specify dlt.conf path Signed-off-by: Saya Sugiura <[email protected]> * Offline-Logstorage - Skip the file when prepare fails This change allows to append directory path in File option in dlt_logstorage.conf (e.g. File=path/Filename). If path does not exist and file preparation fails, it will try up to DLT_OFFLINE_LOGSTORAGE_MAX_ERRORS times (=5 times) If it reaches the maximum, that file will be skipped from next trial so that the daemon does not try to prepare file under non-existing directory every time the log message is received. Signed-off By: Saya Sugiura <[email protected]> * logstorage: Add internal function to store config Signed-off-by: Saya Sugiura <[email protected]> * cfg: make multiple config mechanism avaiable in logstorage Signed-off-by: Felix Herrmann <[email protected]> * logstorage: Add max cache size test case Signed-off By: Matthias Dangers <[email protected]> * logstorage: Add debug and details log messages Signed-off By: Saya Sugiura <[email protected]> * logstorage: Add option to disable network routing in DLT Daemon, when only file is configured If the option is enabled in dlt_logstorage,conf, routing to network will be disabled if the corresponding key (APID:CTID:ECUID) is available in logstorage. For ecucfg, if network is not set to log mode, routing to network will be disabled. Signed-off-by: Saya Sugiura [email protected] * Resolve compile warnings Signed-off-by: Saya Sugiura <[email protected]> * logstorage: Correctly calculate logstorage cache Signed-off-by: Saya Sugiura <[email protected]> * logstorage:update remain file size In CACHE_BASED strategy, the current write offset file should be updated only if the it is less than configured size Signed-off-by: Bui Nguyen Quoc Thanh <[email protected]> * LogStorage: Call fsync() before fclose() for ON_MSG sync strategy To sync buffer to file, fsync() is called before fclose() on ON_MSG. Signed-off-by: Saya Sugiura <[email protected]> * logstorage: Change path of MessageFilterConfigFile in dlt.conf Set value of configured file_size for checking logstorage file synchronization Clean the created DLT files on every test cases Dlt-daemon cannot run when testing with CTest under source folder due to path of MessageFilterConfigFile is incorrect Change relative path of MessageFilterConfigFile to absolute path in dlt.conf.in Signed-off-by: Le Tin <[email protected]> * logstorage:incorrect type of index The variable type of index should not be unsigned if it is possible to be negative. Otherwise, the validation will be wrong Signed-off-by: Bui Nguyen Quoc Thanh <[email protected]> --------- Signed-off-by: Felix Herrmann <[email protected]> Signed-off-by: Saya Sugiura <[email protected]> Signed-off-by: Saya Sugiura [email protected] Signed-off-by: Bui Nguyen Quoc Thanh <[email protected]> Signed-off-by: Le Tin <[email protected]> Co-authored-by: Saya Sugiura <[email protected]> Co-authored-by: Felix Herrmann <[email protected]> Co-authored-by: Matthias Dangers <[email protected]> Co-authored-by: Bui Nguyen Quoc Thanh <[email protected]> Co-authored-by: Le Tin <[email protected]>
1 parent 22d394f commit 4ed1b97

File tree

66 files changed

+2764
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2764
-252
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ include/dlt/dlt_user.h
1717
cmake-build-debug/
1818
.vscode/
1919
googletest/
20+
21+
# exclude temporary files
22+
cscope.out
23+
*.swp

CMakeLists.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,20 @@ set(DLT_USER "covesa"
9898
set(DLT_QNX_SLOG_ADAPTER_WAIT_BUFFER_TIMEOUT_MS "100"
9999
CACHE STRING "Timeout in milliseconds to wait before messages are dropped when input buffer is full")
100100

101-
option(WITH_DLT_PKGCONFIG "Set to ON to generate pkgconfig .pc files" ON)
102-
option(WITH_DLT_CXX11_EXT "Set to ON to build C++11 extensions" OFF)
103-
option(WITH_DLT_COREDUMPHANDLER "EXPERIMENTAL! Set to ON to build src/core_dump_handler binaries. EXPERIMENTAL" OFF)
104-
option(WITH_DLT_LOGSTORAGE_CTRL_UDEV "PROTOTYPE! Set to ON to build logstorage control with udev support" OFF)
105-
option(WITH_DLT_LOGSTORAGE_GZIP "Set to ON to build logstorage control with gzip compression support" OFF)
106-
option(WITH_DLT_USE_IPv6 "Set to ON for IPv6 support" ON)
107-
option(WITH_DLT_KPI "Set to ON to build src/kpi binaries" OFF)
108-
option(WITH_DLT_FATAL_LOG_TRAP "Set to ON to enable DLT_LOG_FATAL trap(trigger segv inside dlt-user library)" OFF)
109-
option(WITH_UDP_CONNECTION "Set to ON to enable dlt UDP multicast SUPPORT" OFF)
110-
option(WITH_LIB_SHORT_VERSION "Set to ON to build library with only major number in version" OFF)
111-
option(WITH_DLT_DISABLE_MACRO "Set to ON to build code without Macro interface support" OFF)
112-
option(WITH_LEGACY_INCLUDE_PATH "Set to ON to add <prefix>/dlt to include paths
113-
for the CMake config file, in addition to only <prefix>" ON)
114-
option(WITH_EXTENDED_FILTERING "Set to OFF to build without extended filtering.
115-
Json filter only supports Linux based system with json-c and QNX" OFF)
101+
option(WITH_DLT_PKGCONFIG "Set to ON to generate pkgconfig .pc files" ON)
102+
option(WITH_DLT_CXX11_EXT "Set to ON to build C++11 extensions" OFF)
103+
option(WITH_DLT_COREDUMPHANDLER "EXPERIMENTAL! Set to ON to build src/core_dump_handler binaries. EXPERIMENTAL" OFF)
104+
option(WITH_DLT_LOGSTORAGE_CTRL_UDEV "PROTOTYPE! Set to ON to build logstorage control application with udev support" OFF)
105+
option(WITH_DLT_LOGSTORAGE_GZIP "Set to ON to build logstorage control application with gzip compression support" OFF)
106+
option(WITH_DLT_USE_IPv6 "Set to ON for IPv6 support" ON)
107+
option(WITH_DLT_KPI "Set to ON to build src/kpi binaries" OFF)
108+
option(WITH_DLT_FATAL_LOG_TRAP "Set to ON to enable DLT_LOG_FATAL trap(trigger segv inside dlt-user library)" OFF)
109+
option(WITH_UDP_CONNECTION "Set to ON to enable dlt UDP multicast SUPPORT" OFF)
110+
option(WITH_LIB_NO_VERSION "Set to ON to build library without any version" OFF)
111+
option(WITH_LIB_SHORT_VERSION "Set to ON to build library with only major number in version" OFF)
112+
option(WITH_DLT_DISABLE_MACRO "Set to ON to build code without Macro interface support" OFF)
113+
option(WITH_LEGACY_INCLUDE_PATH "Set to ON to add <prefix>/dlt to include paths for the CMake config file, in addition to only <prefix>" ON)
114+
option(WITH_EXTENDED_FILTERING "Set to OFF to build without extended filtering. Using json filter files is only supported for Linux based system with json-c and QNX." OFF)
116115

117116
option(WITH_DLT_DAEMON_VSOCK_IPC "Set to ON to enable VSOCK support in daemon" OFF)
118117
option(WITH_DLT_LIB_VSOCK_IPC "Set to ON to enable VSOCK support in library (DLT_IPC is not used in library)" OFF)
@@ -473,6 +472,7 @@ message(STATUS "DLT_VSOCK_PORT = ${DLT_VSOCK_PORT}")
473472
message(STATUS "WITH_UDP_CONNECTION = ${WITH_UDP_CONNECTION}")
474473
message(STATUS "WITH_DLT_QNX_SYSTEM = ${WITH_DLT_QNX_SYSTEM}")
475474
message(STATUS "WITH_DLT_NETWORK_TRACE = ${WITH_DLT_NETWORK_TRACE}")
475+
message(STATUS "WITH_LIB_NO_VERSION = ${WITH_LIB_NO_VERSION}")
476476
message(STATUS "WITH_LIB_SHORT_VERSION = ${WITH_LIB_SHORT_VERSION}")
477477
message(STATUS "WITH_LEGACY_INCLUDE_PATH = ${WITH_LEGACY_INCLUDE_PATH}")
478478
message(STATUS "WITH_EXTENDED_FILTERING = ${WITH_EXTENDED_FILTERING}")

0 commit comments

Comments
 (0)