mirror of https://gerrit.osmocom.org/libosmocore
4abda9ea26
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 |
||
---|---|---|
.. | ||
fail_cmd_ret_warning.cfg | ||
fail_not_de-indented.cfg | ||
fail_tabs_and_spaces.cfg | ||
fail_too_much_indent.cfg | ||
ok.cfg | ||
ok_deprecated_logging.cfg | ||
ok_empty_parent.cfg | ||
ok_ignore_blank.cfg | ||
ok_ignore_comment.cfg | ||
ok_indented_root.cfg | ||
ok_more_spaces.cfg | ||
ok_tabs.cfg | ||
ok_tabs_and_spaces.cfg | ||
vty_test.c | ||
vty_test.ok | ||
vty_transcript_test.c | ||
vty_transcript_test.vty |