summaryrefslogtreecommitdiff
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* libdlt: Do not allow DLT usage in forked child (#95)Simon Herkenhoff2019-02-041-6/+16
| | | | | | | | | | | | | DLT shall not be used in a forked child until a variant of exec() is called, because DLT is using non async-signal-safe functions. The forking process can continue to use libdlt's logging facilities, but any attempt to use libdlt from the forked child will be denied. The fork-handler test is updated to reflect this by trying to log from the forked child which will fail. The fork then calls exec and runs another application that can continue to use DLT. Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com>
* Code beautification using uncrustifyChristoph Lipka2018-12-2110-2548/+2110
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Cleanup of unit test fixesManikandan C2018-12-211-0/+3
| | | | Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
* UnitTest: UpdatesManikandanC2018-12-211-15/+14
| | | | | | | | | | | | 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-0/+4
| | | | | | | | | | | 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: fix dlt_client_cleanup memory handlingOnkar Palkar2017-02-063-6/+30
| | | | | | | Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Add dlt_user_is_logLevel_enabled APIChristoph Lipka2016-09-231-0/+50
| | | | | | | | | | 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
* DLT_PTR: User macro to print pointersChristoph Lipka2016-04-281-0/+5
| | | | | | | | This macro internally checks the size of a void pointer to decide if the pointer address is sent with DLT_HEX32 or DLT_HEX64 macro. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: Ie316ac411f2174e0760e09244d04b83c8006f55d
* Unix socket control interfaceChristoph Lipka2015-11-243-6/+6
| | | | | | | | | | | | | | | | 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>
* Purged all warnings for -Wall -WextraLutz Helwing2015-10-284-26/+23
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Set DLT_USER_BUF_MAX_SIZE to 1390 to prepare UDP message transportLutz Helwing2015-10-282-6/+13
| | | | | | | | | | dlt-test-client and dlt-test-filetransfer have global failed test counter so they can return 1 on failure Using DLT_USER_BUF_MAX_SIZE in dlt-test-client.c truncated check Set path to /usr/local/share/ in dlt-test-filetransfer.c Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added programme to test repeated calls of dlt_init and dlt_freeSven Hassler2015-10-072-1/+158
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-078-1576/+1576
| | | | | | | | | | 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 whitespace and formatting of new code Fixed licence headersLutz Helwing2015-10-071-34/+56
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add env-var to set initial log-levelsStefan Vacek2015-10-071-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Allow applications to fork()Stefan Vacek2015-10-072-1/+53
| | | | | | | | - if fork() is called from an application, dlt is reset and user application needs to re-register application and contexts in child-process Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Restrict dlt-receive to write max. n-bytesStefan Vacek2015-10-071-0/+72
| | | | | | | | - dlt-receive gets a new parameter to restrict the maximum size of the written file. When the limit is exceeded, a new file is opened - testscript (bash) in src/tests provided to demonstrate functionality Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Cleanup masterStefan Vacek2015-10-075-0/+0
| | | | | | | - remove compiler warnings - fix file permissions Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Removed all trailing whitespacesLutz Helwing2015-07-216-33/+33
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed license headers and copyright doxygen commentsLutz Helwing2015-06-1710-19/+19
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-1710-108/+146
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Remove absolute installation paths so that DLT can be installed at any ↵Jacques GUILLOU2015-04-021-1/+3
| | | | | | location (not only "/usr"). Signed-off-by: Jacques GUILLOU <jacques.guillou@pelagicore.com>
* Fix PREFIX. Works now with the default PREFIX (/usr/local/) and with the ↵Alexander Wenzel2015-03-121-5/+1
| | | | | | user PREFIX (e.g. /temp/test_with_pref). PREFIX Fix for filetransfer directory (PREFIX/share/). Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* resolves BUG-206: Install prefix should be configurableTomasz Kondziola2015-03-121-3/+5
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed network trace testAlexander Wenzel2014-10-301-32/+33
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-017-13/+18
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed compiler warnings with 32Bit gcc compiler.Alexander Wenzel2014-04-011-2/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed dlt_free from example and test applications, already called from ↵Alexander Wenzel2014-04-012-4/+0
| | | | | | exit handler. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Yocto fix in build builds.Alexander Wenzel2013-07-311-8/+8
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Bug 84 - Adding utf8 support to dlt-daemon, dlt-viewer. Modified patch, ↵Alexander Wenzel2013-07-252-29/+69
| | | | | | originally provided by Stefan Vacek. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed dlt-test-multi-process with fudge set to 0Simon Brandner2013-07-191-1/+4
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* made the APID strings in dlt-test-multi-process counting from 00-99Simon Brandner2013-07-191-6/+10
| | | | | | made all strerror output in user lib in one line with error message to avoid mixed up line multithreading conditions Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* some coverity fixesSimon Brandner2013-07-191-1/+1
| | | | | | fixed some merge problems Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Semaphores and Pointer passing insteasd by value and otehr coverity issue fixesSimon Brandner2013-07-191-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compiler warningsLassi Marttala2013-07-191-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed most warnings caused by: Wunused-but-set-variable flag. Eome were ↵Simon Brandner2013-07-193-7/+15
| | | | | | kept, because they were the nicer variant to eliminate them, or they seemed reserved for an commandline argument Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Parasoft workaround: solve complaints about missing breaks/returns in ↵Simon Brandner2013-07-196-0/+7
| | | | | | default part of switch statements Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-137]: Automated resending: Improve init. Use everywhere.Lassi Marttala2012-11-261-1/+0
| | | | | | | | | | This is a combination of 2 commits. Rest of the commit messages below. [GDLT-137]: Add resending to all user library places which use buffer. [GDLT-137]: Delay mq opening. Make it thread safe. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-120]: More precise data sizes. Add automatic tests.Lassi Marttala2012-11-262-501/+1430
| | | | | | [GDLT-120]: Fix warnings. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-120]: Segmented Network Trace: Prepare for rewrite.Lassi Marttala2012-11-262-100/+1
| | | | | | | | | | | | | This is a combination of 2 commits. Original descriptions below. [GDLT-120]: Remove dlt_queue. Only usage replace with POSIX queue. [GDLT-120]: Improve documentation. Add a note about context having to be pesistent thorough application lifetime. [GDLT-120]: Add macro interface. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-120]: Improved Network trace. Rewrite to POSIX queue.Lassi Marttala2012-11-262-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | This is a squash of multiple commits. The original commit messages follow. [GDLT-120]: Segmented network trace: Correct error condition checks. [GDLT-120]: Add documentation for extended network trace [GDLT-120]: Add dlt_queue. Linked list based dynamic queue. [GDLT-120]: Recode to using queue for segmented messages [GDLT-120]: Improved thread start handling. Add error handling. Remove libm from linkage. [GDLT-120]: Avoid sending an extraneous empty segment, when size is aligned [GDLT-120]: More expansive return values from dlt_user_log_send_log [GDLT-120]: Change default behaviour of dlt_user_trace_network to truncated, instead of discard. [GDLT-120]: Convert to POSIX queue. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-120] Segmentation of larger messages, raw blocks which fit not in a ↵Lassi Marttala2012-11-261-0/+0
| | | | | | single DLT message Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-115]: Encapsulate more macros. Fix things that used macrosLassi Marttala2012-11-261-15/+5
| | | | | | incorrectly. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-115]: Prevent return value from DLT_REGISTER_APPLassi Marttala2012-11-261-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-93]: Add -Wextra flags for compilationLassi Marttala2012-06-131-1/+2
| | | | | | Fixed all the warnings that popped up with the new flag. Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Added dlt log to injection methodsChristian Muck2012-05-301-3/+2
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* [GDLT-69] Fixed bug in dlt-test-multi-process shares context between threadsLassi Marttala2012-05-301-2/+1
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GENDLT-15, Avoid buffer overrun with snprintf().Lassi Marttala2012-04-041-53/+53
| | | | | | | | | | Check return value of dlt_user_log_write_start(_id) correctly. Reduce the number of applications if allocation fails. Make dlt_user_log_write_start inline Improve error checking in dlt_user_log_write_start_id Use databuffersize to avoid reallocations Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Corrected email of Alexander WenzelChristian Muck2012-03-277-7/+7
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GDLT-38, Update <FILE> fields in licenses.Lassi Marttala2012-03-269-9/+9
|