summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* README: Switch from travis-ci.org to travis-ci.comdevel_travis-ci_comSaya Sugiura2020-12-161-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Add support for logging with VSOCK (#255)Martin Ejdestig2020-12-1419-224/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about VSOCK, see "man vsock" ( https://man7.org/linux/man-pages/man7/vsock.7.html ). Makes it possible for processes in a virtual machine to log directly in DLT running on host without setting up a network connection between guest and host. It is also probably more efficient. Have not done any performance measurements (not main reason for patch), but no forwarding is required as when running DLT in a multi-node setup. When building dlt-daemon for host, WITH_DLT_DAEMON_VSOCK_IPC should be enabled for daemon to listen on incoming VSOCK requests. Local communication method between applications and daemon is still determined with DLT_IPC. When building for guest, WITH_DLT_LIB_VSOCK_IPC should be enabled and DLT_IPC will be ignored, which will make libdlt open a VSOCK socket to the deamon for logging messages. VSOCK can be tested without a virtual machine. Since VMADDR_CID_HOST is used by libdlt when connecting, see vsock man page, clients can be run on host to test VSOCK communication. Some modifications has been done to be able to handle logging through FIFO pipe and socket in the same build of dlt-daemon: - dlt_receiver_init/free_unix_socket() is renamed to dlt_receiver_init/free_global_buffer() and used for FIFO as well. Also fixes memory leak since dlt_receiver_free_unix_socket() was used regardless of whether DLT_USE_UNIX_SOCKET was defined or not. - Pass type to dlt_receiver_init() instead of dlt_receiver_receive(). And remove preprocessor conditionals for handling DLT_CONNECTION_APP_MSG in dlt_daemon_process_user_messages(). Also fixes wrong enum type being passed to dlt_receiver_receive() in dlt_client.c (DltClient::mode was used as a DltReceiverType enum but it is a DltClientMode enum). - Add a flag to DltDaemonApplication to indicate whether file descriptor is "owned" by the DltDaemonApplication or not. When dlt_daemon_application_add() is called due to message received on a socket, fd is passed as an argument (app does not own fd). For FIFO, a per application FIFO is opened (app owns the fd). Also fixes so that user handle is reset for both application and all its contexts when resetting any. Prevents fd from being used by accident after it has been closed. dlt_mkdir_recursive() is moved to src/daemon since it is only used in the daemon. Minimizes use of DLT_USE_UNIX_SOCKET_IPC. Other bugfixes: - Call DLT_SEM_FREE() if setting socket to O_NONBLOCK fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). - Close socket if dlt_receiver_init() fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* Use dlt_defaults for dlt-logd-converter in Android.bp (#271)Martin Ejdestig2020-12-081-3/+1
| | | Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* dlt-control.c: return -1 on error (#259)Moritz Warning2020-12-081-12/+40
| | | Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Check size of ring buffer (#269)schrewe2020-12-071-12/+26
| | | | | | | | | | | | | | There is no check if "data" fits into the ring buffer buffer. This causes a write heap buffer overflow. If data is too big for the ringbuffer nothing is written to the ringbuffer and a error is logged If the buffers are bigger than the free space in the ringbuffer, the ringbuffer is increased by a step size set at initialization. But there is no check if this increase was sufficient. Fix this by using a while loop that increases the ring buffer size until it is big enough or the buffer can not be further increased. Signed-off-by: Jan Schrewe <schrewe@uni-bonn.de>
* dlt_common: Fix buffer overflow in dlt_filter_load (#275)gy7412020-11-301-2/+2
| | | | | | | A buffer overflow in the dlt_filter_load function in dlt_common.c in dlt-daemon allows arbitrary code execution via an unsafe usage of fscanf, because it does not limit the number of characters to be read in a format argument. Fixed: #274 Signed-off-by: GwanYeong Kim <gy741.kim@gmail.com>
* dlt-daemon: Adds an option to disable injection mode (#266)sebastienr2020-11-255-2/+22
| | | | | | A new option named "InjectionMode" allows to select if we want to enable / disable the feature Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
* Add message length checkTobias Öhrström2020-11-191-3/+9
| | | | | | | Adds message length check to android-logd-converter handle malformed message. Signed-off-by: Tobias Öhrström <tobias.ohrstrom@volvocars.com>
* Init logd crash bufferTobias Öhrström2020-11-191-6/+14
| | | | | | | | | - Earlier the crash buffer wasn't initalized, claimed to be binary which isn't true. https://cs.android.com/android/platform/superproject/+/master:system/logging/logcat/logcat.cpp;drc=5837d33d1cfecce0632e385c8ede89c02685238f;l=194 - Also no need register buffers which isnt used. Signed-off-by: Tobias Öhrström <tobias.ohrstrom@volvocars.com>
* Avoid memory access errors with 4-chars context ids (#250)Martin Willers2020-11-173-8/+75
| | | | | | | | | | | | | | | | | | | | | | | | For a 4-chars CTXID, i.e. one that does not include a null character, the strlen() calls were happily accessing memory until they eventually encountered a null character somewhere in memory. This was detected by valgrind, which reported a memory error when using a CTXID such as "INTM": ==21924== Conditional jump or move depends on uninitialised value(s) ==21924== at 0x4C30F78: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21924== by 0x4E4B5A0: dlt_print_id (dlt_common.c:303) ==21924== by 0x4E4CF47: dlt_message_header_flags (dlt_common.c:687) ==21924== by 0x4E51434: dlt_message_print_ascii (dlt_common.c:3169) ==21924== by 0x4E4247A: dlt_user_print_msg (dlt_user.c:4108) ==21924== by 0x4E46D92: dlt_user_log_send_log (dlt_user.c:3670) ==21924== by 0x4E46F14: dlt_user_log_write_finish (dlt_user.c:1611) Sanitize some code Using memset() and memcpy() is always preferable to hand-rolled loops, because compilers have built-in support for them. Signed-off-by: Martin Willers <M.Willers@gmx.net>
* dlt_client.c: remove misleading error message (#258)Moritz Warning2020-11-171-3/+3
| | | | | | Several IP address might be tested for connect. Only output an error if no address succeeds at all. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Fix overflow for -d argument in dlt-example-user (#270)Martin Ejdestig2020-11-171-4/+4
| | | | | | atoi(dvalue) * 1000000 overflows if given a value >= 2147 when sizeof(int) is 4. (2^31 / 10000000 ~= 2147.48) Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* dlt-daemon.c: exit early on error (#261)Moritz Warning2020-11-121-3/+6
| | | | | | Change warning to error, as it will abort the daemon startup. Also reduce the amount of follow up error messages. Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Remove nonexistent file from Android.bp (#264)Martin Ejdestig2020-11-101-1/+0
| | | | | Can not see src/daemon/dlt_daemon_filter.c in history. Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* dlt-control.c: initialize dltdata via struct literal (#257)Moritz Warning2020-11-101-20/+10
| | | | | | this make the code easier to read and initializes all other variables with 0 Signed-off-by: Moritz Warning <moritzwarning@web.de>
* dlt-common.c: ensure null terminated string (#256)Moritz Warning2020-11-101-1/+1
| | | Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Make it easier to use libdlt when building DLT as a CMake subproject (#254)Martin Ejdestig2020-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By calling target_include_directories() for the dlt target in src/lib/. CMake filters out duplicate include paths. So even if the include directories are already added with include_directories() in the top-level CMakeLists.txt, they are not duplicated when the compiler is invoked. For example, with this patch, the following works: [~/Source/foo]$ ls bar CMakeLists.txt dlt-daemon [~/Source/foo]$ cat CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(foo) add_subdirectory(dlt-daemon) add_subdirectory(bar) [~/Source/foo]$ cat bar/CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(bar) add_executable(bar main.cpp) target_link_libraries(bar dlt) install(TARGETS bar RUNTIME DESTINATION bin) bar/main.cpp contains the example from the top of doc/dlt_for_developers.md that does "#include <dlt.h>" and then uses the DLT logging macros. Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* Simplify setting of CONFIGURATION_FILES_DIR in CMakeLists.txt (#247)Martin Ejdestig2020-10-201-6/+1
| | | | | | | | | | | | | | | | | By using CMAKE_INSTALL_FULL_SYSCONFDIR from GNUInstallDirs. It also fixes building with CMAKE_INSTALL_PREFIX=/ that would otherwise warn with: CMake Error at src/daemon/cmake_install.cmake:70 (file): file called with network path DESTINATION. This does not make sense when using DESTDIR. Specify local absolute path or remove DESTDIR environment variable. DESTINATION= //etc Signed-off-by: Martin Ejdestig <mejdestig@luxoft.com>
* Create codeql-analysis.yml (#252)Saya Sugiura2020-10-021-0/+71
| | | | Now github code scanning will run on master branch and PR, in order to easily find security vulnerabilities.
* Modify CMAKE_C_COMPILER check for QNX to accept "qcc" (#246)Martin Ejdestig2020-09-071-1/+1
| | | | | | | | | | | | | | nto-qnx matches architecture "sub-binaries" for qcc, but can also invoke with qcc binary and specify architecture. The CMake documentation has an example for a QNX toolchain file that sets CMAKE_C_COMPILER to qcc, so it is probably very common. See: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx Not sure why this check is needed. (Is qcc really the only compiler that can be used to build for QNX?) An alternative could be to remove it completely. Signed-off-by: Martin Ejdestig <mejdestig@luxoft.com>
* dlt_offline: fix build failures with gcc-10 (#245)Gianfranco Costamagna2020-09-014-2/+5
| | | | | | | | | | | | | | | see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957140 /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* Implement DLTClient for UDP multicast (#240)João Sousa2020-08-316-13/+140
| | | | | | | | | * Add UDP multicast support on client side UDP multicast support is already present on server side. This patch add seemless support for UDP multicast on client side in dlt-receive. Signed-off-by: Joao Sousa <joao.sa.sousa@ctw.bmwgroup.com>
* Revert "dlt_offline: fix build failures with gcc-10"Saya Sugiura2020-08-281-2/+2
| | | | This reverts commit 2fdbe5d1d2d580e643274d0b716b782190ad740d.
* dlt_offline: fix build failures with gcc-10Gianfranco Costamagna2020-08-261-2/+2
| | | | | | | | | | | | | see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957140 /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_client.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_common.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_connection.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: multiple definition of `g_logstorage_cache_size'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:118: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_event_handler.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here /usr/bin/ld: CMakeFiles/dlt-daemon.dir/dlt_daemon_offline_logstorage.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: multiple definition of `g_logstorage_cache_max'; CMakeFiles/dlt-daemon.dir/dlt-daemon.c.o:./obj-x86_64-linux-gnu/src/daemon/./src/offlinelogstorage/dlt_offline_logstorage.h:116: first defined here
* sd-daemon.c: Fix build with newer glibc and musl libcGianfranco Costamagna2020-08-241-1/+1
| | | | | | | | | | | Reported by Khem Raj on meta-oe list TOPDIR/build/tmp/work/armv7vet2hf-neon-yoe-linux-musleabi/dlt-daemon/2.18.5-r0/recipe-sysroot/usr/include/sys/fcntl.h:1:2: error: redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror,-W#warnings] ^ 1 error generated. Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* dlt_user.c: fix the lack of DLT_NETWORK_TRACE_ENABLE definitionKHANH LUONG HONG DUY2020-08-031-0/+2
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Update ReleaseNotes and version to v2.18.5v2.18.5LUONG HONG DUY KHANH(RBVH/ENG42)2020-07-092-2/+124
| | | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* slog2 adapter on QNXNguyen Dinh Thi2020-07-0810-0/+977
| | | | | | | | | | | | | | | dlt-qnx-system can be used to send syslog on QNX to dlt-daemon using slog2 API. It was be built with setting cmake option WITH_DLT_QNX_SYSTEM to ON. Add markdown manual page for dlt-qnx-system Signed-off-by: Nguyen Dinh Thi (RBVH/ENG2) <Thi.NguyenDinh@vn.bosch.com> Signed-off-by: Le Hoang Ngoc Quynh <Quynh.LeHoangNgoc@vn.bosch.com> Signed-off-by: Sebastian Unger <sunger@de.adit-jv.com> Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* Update gtest_dlt_all.sh to detect core dumpKevin-Luong2020-07-061-2/+9
| | | | Signed-off-by: Luong Hong Duy Khanh <khanh.luonghongduy@vn.bosch.com>
* dlt-daemon.c: fix printf format %d to %ld that formats a longKHANH LUONG HONG DUY2020-07-061-2/+2
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* doc/CMakeList.txt: replace dlt_design_specification.txt to .mdKHANH LUONG HONG DUY2020-07-061-1/+1
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* network trace: Fix macro usageKHANH LUONG HONG DUY2020-07-061-1/+1
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* limit logspam in gateway on client overflowFelix Herrmann2020-07-063-61/+39
| | | | | | | | update client buffer overflow counter in send function. Gather all overflow checks into dlt_daemon_client. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Android.bp: fix dlt_user.h genruleFelix Herrmann2020-07-061-3/+5
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* logstorage: Issue with more than 2 filtersBui Nguyen Quoc Thanh2020-07-061-1/+3
| | | | | | | | | | While allocating new memory for record of newest file name, it is mistake to not point to the last element of list. So the total size of list was only 2 at all. Solution: must reserve the last pointer in order the newest file list is updated correctly. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* remove unused featureKHANH LUONG HONG DUY2020-07-062-8/+0
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* gtest_dlt_daemon_gateway: correct comparison operator syntaxLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-061-2/+2
| | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* set DLT_NETWORK_TRACE_ENABLE by cmakedefineFelix Herrmann2020-07-067-4/+64
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* doc: Update dlt_offline_logstorage.mdBui Nguyen Quoc Thanh2020-07-061-0/+1
| | | | | | | Add note/recommendation for the case multiple FILTERs use the same value for `File` setting. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* UT: Fix segfault in logstorage testBui Nguyen Quoc Thanh2020-07-061-0/+1
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* logstorage: support all stragegiesBui Nguyen Quoc Thanh2020-07-062-57/+63
| | | | | | | | In case cached-based strategy is used, the information of newest log file must be updated everytime of synchronization to file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* update cmake VERSION variablesFelix Herrmann2020-07-065-8/+8
| | | | | | | align variable names with cmake 3.3 change. => DLT_VERSION* -> PROJECT_VERSION* Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* simplify and fix android version scriptFelix Herrmann2020-07-061-46/+31
| | | | | | | fix issues caused by 3.3 cmake upgrade and PROJECT variable introduction. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* execute unittests with cmakeFelix Herrmann2020-07-065-35/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now you can do make test after make :) === Sample build and test: $ cmake -Bbuild -H. \ -DDLT_IPC=UNIX_SOCKET \ -DWITH_DLT_ADAPTOR=ON \ -DWITH_DLT_UNIT_TESTS=ON \ -DWITH_DLT_CXX11_EXT=ON \ -DWITH_DLT_MONITOR=OFF \ -DWITH_DLT_USE_IPv6=OFF $ cd build $ make $ make test Running tests... Test project /home/fherrmann/git/dlt-daemon/build Start 1: gtest_dlt_common 1/5 Test #1: gtest_dlt_common ................. Passed 0.02 sec Start 2: gtest_dlt_user 2/5 Test #2: gtest_dlt_user ................... Passed 1.01 sec Start 3: gtest_dlt_daemon_common 3/5 Test #3: gtest_dlt_daemon_common .......... Passed 0.01 sec Start 4: dlt_env_ll_unit_test 4/5 Test #4: dlt_env_ll_unit_test ............. Passed 0.04 sec Start 5: gtest_dlt_daemon_event_handler 5/5 Test #5: gtest_dlt_daemon_event_handler ... Passed 1.01 sec 100% tests passed, 0 tests failed out of 5 Total Test time (real) = 2.09 sec === Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* dlt_design_specification: update contentLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-063-125/+314
| | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* dlt_design_specification: convert from .txt to .md formatLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-062-644/+622
| | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* logstorage: fix syncbehaviourBui Nguyen Quoc Thanh2020-07-061-26/+44
| | | | | | | - In case sync is not ON_MSG, the newest file information does not need to be updated. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* daemon: Fix smoketestBui Nguyen Quoc Thanh2020-07-061-1/+1
| | | | | | - Fix wrong allocation of memory while preparing table Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* unittest: Update according to API's changesBui Nguyen Quoc Thanh2020-07-061-10/+20
| | | | | | | | Updates for two changed API: - dlt_logstorage_open_log_file - dlt_logstorage_prepare_on_msg Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* offline storage: Improvement log messages at bottomBui Nguyen Quoc Thanh2020-07-065-53/+195
| | | | | | | | | | | | | | - In case there are several filters in config dlt_logstorage.conf which are sharing the same file name, the dlt-daemon could not handle to write the dlt messages at the proper file. It means the latest dlt messages might be not written into the newest file. - In order to resolve this, dlt-daemon must keep the newest file for each filename. Everytime new dlt message is going to be written, dlt-daemon must ensure that it must be written out to the newest file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>