summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* common: Isolate FIFO/Unix socketLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-063-7/+40
| | | | | | | | | | | | | | dlt_common - Add preprocessor DLT_USE_UNIX_SOCKET_IPC for dlt_log_set_fifo_basedir() and dltFifoBaseDir variable - Rename input parameter of dlt_log_set_fifo_basedir() dlt-daemon - Replace setting dltFifoBaseDir by dlt_log_set_fifo_basedir() and add preproc DLT_USE_UNIX_SOCKET_IPC - Update -h opt and flags.loggingFilename based on IPC type Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* libdlt: Relocate dltFifoBaseDir settingLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-062-3/+3
| | | | | | | Relocate the setting of dltFifoBaseDir variable from dlt_init() to dlt_check_envvar() Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* doc: md file for dlt_gateway.confBui Nguyen Quoc Thanh2020-07-065-26/+136
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* network trace: Include necessary headersSaya Sugiura2020-07-069-16/+3
| | | | | | | | | | | Some components which links dlt seem to depend on following headers, which will be included by mqueue.h. - sys/types.h - fcntl.h So explicitly include them if mqueue interface is not supported in dlt_user.h. Also two headers are removed if dlt_used.h is included. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* network trace: Add mqueue verificationSaya Sugiura2020-07-068-23/+115
| | | | | | | | | | There is some OS (e.g. Android) which doesn't support message queue. Since network trace uses it as IPC, we need to disable it if following calls are not available: mq_open, mq_close, mq_unlink, mq_send, mq_receive Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Unittest for new apiBui Nguyen Quoc Thanh2020-07-061-1/+55
| | | | | | | Add two new testcases in tests/gtest_dlt_common.cpp for dlt_file_quick_parsing() Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Remove duplicate definition of DLT_CONVERT_TEXTBUFSIZEBui Nguyen Quoc Thanh2020-07-061-1/+0
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* Improve performance of DLT file parsingBui Nguyen Quoc Thanh2020-07-062-0/+83
| | | | | | Introduce new API to support quick parsing a DLT file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* relocation dlt_check_envvar() and update dlt_init() functionsLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-061-6/+6
| | | | Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* Redirect stdout to stderrLUONG HONG DUY KHANH(RBVH/ENG42)2020-07-065-21/+69
| | | | | | | | | | | | - daemon: New feature for LoggingMode at /etc/dlt.conf to be able to set value at 3 in order to redirect all stdout messages to stderr. - libdlt: New feature for DLT_LOG_MODE environment variable to be able to set value at 3 in order to redirect all stdout messages to stderr. - unit test: Add test cases for DLT_LOG_TO_STDERR Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
* Unittest: Update testcaseBui Nguyen Quoc Thanh2020-07-063-2/+21
| | | | | | | | | gtest_dlt_daemon_gateway is updated to test for both cases: "With and Without General section in dlt_gateway.conf" Timeout=0 is now endless retry. So change it to "-1" Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* gateway: Improvement of handling Gateway configBui Nguyen Quoc Thanh2020-07-063-11/+51
| | | | | | | | | | | | | | In the current implementation, we believe in user to treat General section as Mandatory. Hence system could be reset due to memory of connections incorrectly. At the moment, General could be handled as Optional with default value of interval. It means General could be absent from config file. Improvement is to raise WARNING to user, set default value and update the number of connections properly. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* daemon: Avoid spamming message buffer overflowBui Nguyen Quoc Thanh2020-07-062-20/+9
| | | | | | | | | | | | | - In existing implementation, control message "message_buffer_overflow" is sent for every incoming message which is dropped since buffer is full. So UDP and logstorage will receive a lot of these messages. That could be considered as unnecessary. - In order to reduce the useless effort to send "message_buffer_overflow" for every missing message, daemon will only send it out right after buffer is full or right after real client is connected. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* gateway: Support infinite loop of retryBui Nguyen Quoc Thanh2020-07-062-6/+17
| | | | | | | | | | | - In order to enable endless retry of reconnection, "Timeout" in dlt_gateway.conf must be set to 0. - In case of "Timeout" is an integer A and A is greater than 0, so after A times of retry, the connection to passive Node will be marked as DISABLED. There won't be any retry afterward. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* gateway: Configurable interval timeBui Nguyen Quoc Thanh2020-07-065-47/+172
| | | | | | | | | - Introduce "General" section for dlt_gateway.conf - In new section, the interval is used for gateway timer. This entry is optional. By default, it is set to 1 second as the existing hardcoded value. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* tests: remove unused zlib includeFelix Herrmann2020-07-061-1/+0
| | | | | | | Include in dlt-test-receiver introduces zlib dependency. It can be removed as it is not used. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* disable android services by defaultFelix Herrmann2020-07-062-0/+2
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* logstorage: Add NULL check of IDsSaya Sugiura2020-07-061-1/+2
| | | | | | | | | | | | | There is a missing NULL check for APID and CTID in dlt_logstorage_create_keys() function in following condition: - APID is wildcard - CTID is wildcard - ECUID is set Related commit: 557624f SOPL-8567: daemon: logstorage with wildcards Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* snprintf ret > 0 is not always an errorFelix Herrmann2020-07-061-6/+12
| | | | | | | | | snprintf returns the size the resulting string would take. In order to detect truncation, this size needs to be checked against the buffer size. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* fix some gcc9 compiler warningsFelix Herrmann2020-07-069-79/+92
| | | | | | | | | Many stringop-truncation and stringop-overflow warnings are still there (so many). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* fix clang warnings about GNU stuffFelix Herrmann2020-07-064-42/+36
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* android logd forwarderFelix Herrmann2020-07-065-2/+276
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* fix gateway config element searchFelix Herrmann2020-07-061-5/+4
| | | | | | | Only the first configured passive node was checked when a connection request was issued. Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
* doc: update a note for logstorage with wildcardBui Nguyen Quoc Thanh2020-07-061-0/+3
| | | | | | | If both of the parameter "LogAppName" and "ContextName" are set to wildcard or not present in the configuration file, "EcuID" must be specified. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* daemon: logstorage with wildcardsBui Nguyen Quoc Thanh2020-07-061-4/+6
| | | | | | | | | | | | In the current implementation, if FILTER section is setting wildcard for both "LogAppName" and "ContextName", it will be ignored. But it is still a valid configuration for NON-VERBOSE. In order to consolidate the daemon's behavior, the combination of wildcard for both "LogAppName" and "ContextName" in FILTER section will be treated as only ECUID is specified. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* Limit log messages on full bufferFelix Herrmann2020-07-062-5/+10
| | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>