Attention is currently required from: fixeria.

fixeria uploaded patch set #2 to this change.

View Change

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 messate 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.

Change-Id: I54bf5e5c036efb1908232fe3d8e8e2989715fbb3
Related: [1] I393907b3c9e0cc1145e102328adad0a83ee13a9f
---
M tests/logging/logging_test.c
M tests/logging/logging_test_stream.err
M tests/logging/logging_test_wqueue.err
3 files changed, 10 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/27010/2

To view, visit change 27010. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I54bf5e5c036efb1908232fe3d8e8e2989715fbb3
Gerrit-Change-Number: 27010
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newpatchset