aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-11-21 00:19:36 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-11-21 10:48:02 +0700
commit4abda9ea26403e24b2d91b83a1e4c81f5fb4b003 (patch)
tree8a62e78b7a99b884f1b9ffeaf5f52375a2fa0bdb /tests/testsuite.at
parent75c242e6a265b00e48fd3224e0af90025106caa7 (diff)
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
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c231b964..58651409 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -199,7 +199,10 @@ AT_SETUP([vty])
AT_KEYWORDS([vty])
cat $abs_srcdir/vty/vty_test.ok > expout
cp $abs_srcdir/vty/*.cfg .
-AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [ignore])
+# FIXME: calling vty_out() during initialization of the VTY interface would cause
+# the process write to its own *stdin*! This breaks the output of 'make check'.
+# Let's work this around untill the bug in libosmovty is fixed.
+AT_CHECK([$abs_top_builddir/tests/vty/vty_test 0>/dev/null], [0], [expout], [ignore])
AT_CLEANUP
AT_SETUP([gprs-bssgp])