summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix linking problem with tests when systemd enabled (#103)Jiri Popek2019-02-071-5/+5
| | | Change-Id: Ide7c91a9f3a182c4bc2f91613874b0ef3feca648
* Travis CI: build with systemd enabled (#97)Jiri Popek2019-02-021-0/+4
| | | | | | * Travis CI: build with systemd enabled * fix the 'sd_booted' linker issue
* Code beautification using uncrustifyChristoph Lipka2018-12-2111-4388/+4929
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Cleanup of unit test fixesManikandan C2018-12-214-27/+21
| | | | Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
* gtest: Modification to offline logstorageSaya Sugiura2018-12-211-6/+12
| | | | | | | | - Change the name of test case from hash to list - Add file_name definition in the test case which calls dlt_logstorage_list_add() Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* UnitTest: UpdatesManikandanC2018-12-2111-669/+1057
| | | | | | | | | | | | Gateway Logstorage Event Handler Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Use poll in the dlt-daemon for POSIX complianceManikandanC2018-11-301-152/+193
| | | | | | | | | | | The poll system call is now used in the daemon to enable DLT use in POSIX compliant systems. Also added introduced new unregister_app macro to avoid missing of logs in startup buffer. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* dlt-client: logging: Extended the receiver buffer sizeManikandan C2018-11-231-7/+7
| | | | | | | | | | | - dlt-control couldn't receive all the GET_LOG_INFO response message when many applications and contexts are registered. Therefore the receiver buffer size was extended to 65K. Also the receive buffer size macros are reduced to one variable. - Code cleanup and improvements Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Gateway ImprovementsManikandan C2018-11-235-85/+1816
| | | | | | | | | | | | | -Support to send and parse periodic control messages -add application/contexts to passive ECU list -Refactor dlt_gateway_send_control_message -Gateway issues with corrupted data and on demand connection -Unit Test update Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com Signed-off-by: S. Hameed shameed@jp.adit-jv.com Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
* dlt-daemon: per ECU list of user information (#80)ManikandanChockalingam2018-10-302-155/+453
| | | | | | Prepare daemon to store applications/context information of other ECUs as well. This commit prepares the dlt-daemon to store logs from passive nodes in a logstorage device. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* minor compiler warning gcc 7.x (#30)Phong Tran2018-03-291-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix -Wpointer-compare of compare with null char Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common: fix -Wformat-truncation of snprintf Avoid snprintf output truncation by handling return value Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_offline_trace: Fix Wformat-truncation of snprintf Compile with Gcc 7.x has the warning of snprintf buffer length size. Check return value of snprintf() for avoiding the warning. Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common_test: Fix memleak t_dlt_message_read some resources were not free after using. Detected by running valgrind --leak-check=full ./gtest_dlt_common Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* journald adaptor: test with sudo privileges (#18)Gordan Markuš2017-06-161-2/+2
| | | | | | | | Users in the 'systemd-journal' group can see all journalctl messages. Usually the user is not found in that group and the "start_systemd_journal_test.sh" script might hang because of this. Starting "dlt-system" with sudo privileges will mitigate this risk. Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* Systemd-journal-test: Add WITH_DLT_UNIT_TEST flag when building sourcesChristoph Lipka2016-10-241-1/+1
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Smoketest: Offline LogstorageOnkar Palkar2016-10-241-0/+206
| | | | | | | This test script checks basic functionality of DLT Offline Logstorage feature. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Smoketest: MultinodeOnkar Palkar2016-10-241-0/+302
| | | | | | This test script checks basic functionality of DLT Multinode feature Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unit Test: Event handlingChristoph Lipka2016-10-242-0/+658
| | | | | | Unit tests for DLT Daemon connection and event handling Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unit Test: MultiNodeOnkar Palkar2016-10-242-1/+581
| | | | | | Unit test for DLT MultiNode extension Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unit Test: Multinode Unit test preparation scriptS. Hameed2016-10-241-0/+137
| | | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Add dlt_user_is_logLevel_enabled APIChristoph Lipka2016-09-231-0/+28
| | | | | | | | | | This function allows an application developer to check if the DLT LogLevel is enabled before starting any log string creation. It can be used in application specific logging wrapper functions. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I4c269b12bfdeae29a4e795385cdbc54a579ba621
* Fixed D-Bus tracing not working anymoreAlexander Wenzel2016-05-131-2/+2
| | | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Topic: GENDLT-425 Change-Id: I4ec56d714804d9ee4fa904b71c58dafd00990b4f
* Added abnormal unit tests to check DLT_RETURN_USER_BUFFER_FULLLutz Helwing2016-04-221-29/+68
| | | | Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Fix bug with truncation of string or raw blockLutz Helwing2016-02-251-1/+1
| | | | | | | | With commit d319ebf4d2d449d70befae0eebbdd82c19c5315f a bug was introduces which lead to some messages getting not transmitted. Change-Id: I9f20177fbc7db9d7caf527e14159444b5fec168a Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Truncate of string or raw block, if length exceeds maximum message lengthLutz Helwing2016-02-191-2/+2
| | | | | | | | | | | | | Previously if messages containing strings or raw data were exceeding the maximum message size (DLT_USER_BUF_MAX_SIZE, currently set to 1390) they were discarded completely. This behaviour is changed so that too large data is truncated and sent anyway. Commented out part of unit test for dlt_log_raw abnormal where negative values for unsigned length were passed. Change-Id: I4f6bf152e7125924717c941ad7ebb8fd79787715 Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Set default log-levels in dlt.confStefan Vacek2015-12-091-35/+35
| | | | | | | | - feature: allow to define a default-log-level in dlt.conf (see dlt.conf for documentation) - bugfix: make dlt_unlock_mutex not inline to fix linkage - bugfix: initial log-level was not set correctly when no dlt-daemon was running Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fixed dlt-example-non-verbose-1.xmlSven Hassler2015-12-041-1/+1
| | | | | | Removed -e from shebang line of start_system_logger_test.sh Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Unix socket control interfaceChristoph Lipka2015-11-241-2/+2
| | | | | | | | | | | | | | | | Control applications running in the same Linux OS should be able to communicate with the DLT Daemon via a socket connection. To be able to do that, the DLT Client library need to be extended. DLT Clients connected via this UNIX socket are not handled as normal DLT Clients and no log messages will be forwarded to them. This avoids problems in situations when a control application is connected to the DLT Daemon before any other 'real' DLT Client (e.g. DLT Viewer) is connected. In this situations, all already stored log messages are flushed to the control application and therefore lost, because the control application most likely ignore all incoming messages besides the one in which it is interested in. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Added core dump handler codeLutz Helwing2015-10-281-3/+2
| | | | | | | | | | | | | | | | | | | | Fixed author Doxygen tag Added licence headers Moved return value definition to new header Converted all DOS line endings to Unix Solution for CPU dependency by using CMAKE_SYSTEM_PROCESSOR cmake variable CPU specific stuff is implemented in own implementation file for each CPU architecture Added config file for sysctl. Fixed wrong parameters to open call for lockfile Added mechanism to overwrite TARGET_CPU_NAME with command line option Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Got rid of warnings from some older compilersLutz Helwing2015-10-281-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Purged all warnings for -Wall -WextraLutz Helwing2015-10-284-106/+197
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-075-2430/+2431
| | | | | | | | | | DLT daemon improvement - parameter value range check Adapt unit tests to check for enum return values Changed C version to gnu99 and C++ version to gnu++0c Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed C++ version for cpp extension to -std=gnu++0xLutz Helwing2015-10-071-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Allow multiple instances of dlt-daemonStefan Vacek2015-10-071-0/+10
| | | | | | | | | | | | | | | | - Make dlt-daemon configurable to specify directory of fifos and port of dlt-daemon, this allows to run multiple instances of dlt-daemon at one node at the same time. This is useful in testing environment where simultanous tests should not interfere due to the same instance of dlt-daemon - dlt-daemon: add option -t <dir> to specify a directory where all fifos will be created - dlt-daemon: add option -p <port> to specify the port under which dlt-daemon can be connected - client-library: add environment variable DLT_PIPE_DIR to specify a non-default directory of fifos for logging applications - client-library: add environment variable DLT_DAEMON_TCP_PORT to specify the port under which dlt-daemon can be reached (especially when using dlt-receive) Signed-off-by: Stefan Vacek <stefan.vacek@intel.com> Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Fixed whitespace and formatting of new code Fixed licence headersLutz Helwing2015-10-074-567/+596
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add C++ extensionStefan Vacek2015-10-072-0/+123
| | | | | | | | | | | - header only implementation, uses variadic templates from C++ 11 - Enable installation and building tests with -DWITH_DLT_CXX11_EXT - allow logging in the form of DLT_LOG_CXX(context, level, param1, param2, param3), e.g. - allow logging of user types (if a function logToDlt for the given user-type is present), e.g. - Added pkg-config file automotive-dlt-c++.pc - Sample code is provided in tests/dlt-test-cpp-extension.cpp Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Allow registration of contexts before application is registeredStefan Vacek2015-10-072-0/+35
| | | | Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Add env-var to set initial log-levelsStefan Vacek2015-10-072-0/+542
| | | | | | | | | | | | | | | | | | | | | | | | | | | name of environment variable: DLT_INITIAL_LOG_LEVEL Syntax: <apid1>:<ctid1>:<loglevel1>;<apid2>:<ctid2>:<loglevel2>;... apid: application id (up to 4 chars), if empty all applications will match ctid: context id (up to 4 chars), if empty all contexts will match loglevel: either -1..6 or a symbolic name (default, off, fatal, error, warning, info, debug, verbose) Examples: DLT_INITIAL_LOG_LEVEL=TEST:LOG:0 -> turn off logging for appid TEST and contextid LOG DLT_INITIAL_LOG_LEVEL=:LOG:warn -> for contexts with name "LOG" set log-level to warning (3) DLT_INITIAL_LOG_LEVEL=::VERBOSE -> set log-level of all contexts to VERBOSE DLT_INITIAL_LOG_LEVEL=::VERBOSE;TEST:LOG:3 -> set log-level of all contexts to VERBOSE except TEST:LOG, set this to WARNING dlt-example-user: add option -l to specify log-level to be used when sending messages Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Cleanup masterStefan Vacek2015-10-074-34/+34
| | | | | | | - remove compiler warnings - fix file permissions Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* workaround for unit test dlt_get_log_stateStefan Held2015-07-301-2/+3
| | | | | Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed all trailing whitespacesLutz Helwing2015-07-215-165/+165
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* modify start_system_logger_test.shStefan Held2015-07-211-1/+1
| | | | | Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add start_system_logger_test.sh Modify start_filetransfer_test.sh Modify ↵Stefan Held2015-07-216-8/+128
| | | | | | | start_systemd_journal_test.sh Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add shortcuts for different tests in dlt_test_receiver Modify ↵Stefan Held2015-07-213-44/+116
| | | | | | | start_filetransfer_test.sh Create start_systemd_journal_test.sh Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Rework of unit testsStefan Held2015-07-214-743/+490
| | | | | Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added licence and Doxygen headersLutz Helwing2015-07-214-12/+101
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add the forgotten son gtest_dlt_daemon_commonStefan Held2015-07-212-97/+97
| | | | | | | | | Rework of unit tests in gtest_dlt_daemon_common No need to fix nullpointer Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Rework of unit tests in gtest_dlt_userStefan Held2015-07-211-75/+285
| | | | | | | Fix all nullpointer errors in dlt_user.c Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Rework of unit tests in gtest_dlt_commonStefan Held2015-07-212-229/+378
| | | | | | | Fix all nullpointer errors in dlt_common.c Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* changed dlt-test-receiver delete dlt-test-filetranfer make a bash script ↵Stefan Held2015-06-175-260/+52
| | | | | | | wich tests the filetransfer Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new filestranfer test filetransfer: send data with crc32 checksum ↵Stefan Held2015-06-173-0/+627
| | | | | | | receiver: receive data, save it at /tmp and verifiy the checksum Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Adding unit tests for following functions:Jens Bocklage2015-06-171-840/+1277
| | | | | | | | | | | | | | | | | | | | int dlt_register_injection_callback(DltContext *handle, uint32_t service_id, int (*dlt_injection_callback)(uint32_t service_id, void *data, uint32_t length)); int dlt_register_log_level_changed_callback(DltContext *handle, void (*dlt_log_level_changed_callback)(char context_id[DLT_ID_SIZE],uint8_t log_level, uint8_t trace_status)); int dlt_user_trace_network(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload); int dlt_user_trace_network_truncated(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload, int allow_truncate); int dlt_user_trace_network_segmented(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload); int dlt_set_log_mode(DltUserLogMode mode); int dlt_get_log_state(); int dlt_verbose_mode(void); int dlt_nonverbose_mode(void); Commented out the functions that fail with the comment // TODO: Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>