Hello pespin, laforge, Jenkins Builder,

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/libosmocore/+/16140

to look at the new patch set (#3).

Change subject: logging/vty: fix: actually ignore deprecated logging commands
......................................................................

logging/vty: fix: actually ignore deprecated logging commands

We shall not prevent programs from starting if their configuration
files contain deprecated 'logging level ...' commands. Just print
a warning and return CMD_SUCCESS instead of CMD_WARNING.

While writing a unit test, another funny bug has been uncovered.
Parsing of a deprecated command indeed triggers a deprecation
warning, originated from libosmovty's log_deprecated_func().
This function simply calls vty_out(), but...

Since the invocation of the vty_out() happens _before_ the VTY
is initialized, the process is actually writing that warning
to its own stdin! Most likely, because we use talloc_zero()
to allocate a new instance of struct 'vty'.

As a side effect, the evil warning magically appears in the output
of 'make check', breaking the test statistics. Let's work around
this bug for now by redirecting stdin to /dev/null.

Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a
Fixes: Ic9c1b566ec4a459f03e6319cf369691903cf9d00
---
M src/vty/logging_vty.c
M tests/Makefile.am
M tests/testsuite.at
A tests/vty/ok_deprecated_logging.cfg
M tests/vty/vty_test.c
M tests/vty/vty_test.ok
6 files changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/16140/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a
Gerrit-Change-Number: 16140
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <axilira...@gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilira...@gmail.com>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newpatchset

Reply via email to