From 8fde91ce996fb6370266bb653246cd449e171ba0 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 24 Oct 2019 14:05:19 -0700 Subject: [PATCH] statistics test: fix the expected "active sockets" values since the listening socket is now handled by the netmgr, it isn't counted in the "active sockets" stat anymore, so the expected values have changed. --- bin/tests/system/statistics/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index ccbca44996..ce82d0d2a8 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -71,7 +71,7 @@ $RNDCCMD -s 10.53.0.3 stats > /dev/null 2>&1 [ -f ns3/named.stats ] || ret=1 if [ ! "$CYGWIN" ]; then nsock0nstat=`grep "UDP/IPv4 sockets active" ns3/named.stats | awk '{print $1}'` - [ 0 -ne ${nsock0nstat:-0} ] || ret=1 + [ 0 -eq ${nsock0nstat:-0} ] || ret=1 fi if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -107,7 +107,7 @@ if [ ! "$CYGWIN" ]; then ret=0 echo_i "verifying active sockets output in named.stats ($n)" nsock1nstat=`grep "UDP/IPv4 sockets active" ns3/named.stats | awk '{print $1}'` - [ `expr $nsock1nstat - $nsock0nstat` -eq 1 ] || ret=1 + [ `expr ${nsock1nstat:-0} - ${nsock0nstat:-0}` -eq 1 ] || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` n=`expr $n + 1`