libosmocore/tests
Vadim Yanitskiy eff0880f3b tests/logging: also test printing the filename information
This commit demonstrates a bug introduced in [1], which can be
observed when the logging is configured to print the filename
*after* the logging message (LOG_FILENAME_POS_HEADER_END):

  logging print file 1 last
                       ^^^^

In this mode, the code in _output_buf() overwrites the '\n' sybmol
contained in the logging message itself by shifting the 'offset'
backwards, and appends the nipped '\n' after the filename info.

The problem is that the 'len' variable is not updated in this case,
so the resulting length includes +1 character - '\0', which gets
printed at the end of every logging line.

Interestingly enough, this problem affects only the wqueue mode.

Change-Id: I54bf5e5c036efb1908232fe3d8e8e2989715fbb3
Related: [1] I393907b3c9e0cc1145e102328adad0a83ee13a9f
2022-01-31 15:47:42 +06:00
..
a5 tests: a5_test: Print wrong buffer correctly on error 2018-05-16 21:13:58 +02:00
abis treewide: remove FSF address 2021-12-14 12:44:03 +01:00
auth Use define for key buffers 2018-12-20 09:51:02 +00:00
base64 base64: reformat using Lindent to conform to our coding style 2021-09-21 19:57:56 +00:00
bitgen bitXXgen: add osmo_loadXXbe_ext_2() to get right-adjusted values 2020-09-14 11:53:46 +00:00
bits tests: bitrev_test: Fix dynamic-stack-buffer-overflow 2018-05-16 17:10:33 +02:00
bitvec bitvec_read_field(): fix incorrect bit-shift issue found by UBSan 2021-11-18 13:11:20 +00:00
bsslap bssmap_le/bsslap tests: We must use %td for ptrdiff_t printing 2020-10-09 09:55:53 +02:00
bssmap_le bssmap_le/bsslap tests: We must use %td for ptrdiff_t printing 2020-10-09 09:55:53 +02:00
codec codec: Add functions for AMR s->d bits and d->s bits 2020-05-14 14:51:22 +02:00
coding treewide: remove FSF address 2021-12-14 12:44:03 +01:00
comp128 tests: test actual support status for auth. algo 2016-06-29 16:33:40 +00:00
context context: Add support for [per-thread] global talloc contexts 2019-08-27 13:43:31 +02:00
conv conv: add convolutional coder for AMR SID UPDATE frames 2020-03-09 13:40:27 +01:00
ctrl ctrl: Pre-calculate required size before allocating msgb 2021-06-15 16:29:44 +00:00
dtx treewide: remove FSF address 2021-12-14 12:44:03 +01:00
endian add/clean big-endian packed structs (struct_endianess.py) 2018-12-19 18:40:03 +00:00
exec Introduce helper functions for safe fork+exec of processes 2019-12-17 13:49:28 +01:00
fr treewide: remove FSF address 2021-12-14 12:44:03 +01:00
fsm Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
gad add GAD coding for Location Services 2020-10-07 11:39:46 +00:00
gb ns2: message: BLOCK/BLOCK ACK allow to use a given NSVCI instead of using the nsvc nsvci 2021-10-08 05:43:46 +00:00
gea tests: gea_test: Use correct max size for key in buffer 2018-05-16 20:09:39 +02:00
gprs use osmo_init_logging2() with proper talloc ctx 2018-04-06 04:37:50 +02:00
gsm48 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0408 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0502 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0808 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm23003 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm23236 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm29205 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsup Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
i460_mux tests/*: fix control reaches end of non-void func 2021-01-21 12:13:42 +00:00
it_q tests/*: fix control reaches end of non-void func 2021-01-21 12:13:42 +00:00
iuup iuup: Submit RNL-STATUS-Initialization.ind upon rx of Init 2022-01-07 13:02:56 +00:00
kasumi gsm: kasumi: Fix dynamic-stack-buffer-overflow on out buffers not multiple of 64 bits 2018-05-17 12:13:04 +02:00
lapd treewide: remove FSF address 2021-12-14 12:44:03 +01:00
logging tests/logging: also test printing the filename information 2022-01-31 15:47:42 +06:00
loggingrb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
msgb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
msgfile treewide: remove FSF address 2021-12-14 12:44:03 +01:00
oap treewide: remove FSF address 2021-12-14 12:44:03 +01:00
osmo-auc-gen osmo-auc-gen: Print RFC3310 IMS HTTP-AKA style base64 nonce/res 2021-09-21 19:57:56 +00:00
prbs Add pseudo-random bit sequence generator to libosmcoore 2017-07-10 23:42:02 +02:00
sercomm treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sim treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sms treewide: remove FSF address 2021-12-14 12:44:03 +01:00
smscb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sockaddr_str treewide: remove FSF address 2021-12-14 12:44:03 +01:00
socket treewide: remove FSF address 2021-12-14 12:44:03 +01:00
stats select: gather statistics for TCP connections 2021-12-23 14:52:15 +00:00
strrb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
tdef treewide: remove FSF address 2021-12-14 12:44:03 +01:00
time_cc add osmo_time_cc, moved from osmo-bsc 2021-11-15 09:06:03 +00:00
timer treewide: remove FSF address 2021-12-14 12:44:03 +01:00
tlv tlv: Fix length returned by t{l16,16l}v_put 2021-03-18 14:20:35 +01:00
use_count treewide: remove FSF address 2021-12-14 12:44:03 +01:00
ussd treewide: remove FSF address 2021-12-14 12:44:03 +01:00
utils treewide: remove FSF address 2021-12-14 12:44:03 +01:00
vty treewide: remove FSF address 2021-12-14 12:44:03 +01:00
write_queue Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
Makefile.am tests/logging: ensure both stream and wqueue modes are tested 2022-01-31 15:45:22 +06:00
atlocal.in build: make check: disable sim_test when built with --disable-pcsc 2016-11-16 16:40:44 +00:00
libsercomstub.c Embedded: add sercomm stubs 2018-01-21 19:08:05 +00:00
testsuite.at tests/logging: ensure both stream and wqueue modes are tested 2022-01-31 15:45:22 +06:00