From a48ca15e77f47dfc10f7b0673eeb936d1a8ba7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Wed, 28 Nov 2018 13:59:38 +0000 Subject: [PATCH 1/2] Fetchlimit test: update softquota limit to 380. In the test the quota is set to 400, and softquota to 90%*400=360. We first attach to quota, and then if we're above softquota we drop the oldest client. With new socket code and taskmgr it's parallel enough to create a race between multiple instances doing 'attach to quota' and then 'drop oldest client' - making number of clients go over softquota. It's not a problem in real life, as it's just soft quota. --- bin/tests/system/fetchlimit/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/fetchlimit/tests.sh b/bin/tests/system/fetchlimit/tests.sh index 55309d7b3c..d7fb00a493 100644 --- a/bin/tests/system/fetchlimit/tests.sh +++ b/bin/tests/system/fetchlimit/tests.sh @@ -166,7 +166,7 @@ touch ans4/norespond for try in 1 2 3 4 5; do burst b $try 400 $DIG @10.53.0.3 -p ${PORT} a ${try}.example > dig.out.ns3.$try - stat 370 || exceeded=`expr $exceeded + 1` + stat 380 || exceeded=`expr $exceeded + 1` grep "status: NOERROR" dig.out.ns3.$try > /dev/null 2>&1 && \ success=`expr $success + 1` grep "status: SERVFAIL" dig.out.ns3.$try > /dev/null 2>&1 && \ @@ -177,7 +177,7 @@ echo_i "$success successful valid queries (expected 5)" [ "$success" -eq 5 ] || { echo_i "failed"; ret=1; } echo_i "$fail SERVFAIL responses (expected 0)" [ "$fail" -eq 0 ] || { echo_i "failed"; ret=1; } -echo_i "clients count exceeded 370 on $exceeded trials (expected 0)" +echo_i "clients count exceeded 380 on $exceeded trials (expected 0)" [ "$exceeded" -eq 0 ] || { echo_i "failed"; ret=1; } if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` From 9532e3256eb40c89a77bfa1071192303d695da9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Wed, 28 Nov 2018 15:01:06 +0000 Subject: [PATCH 2/2] tcp test: sleep for 1 second before gathering stats to make sure that the stats are there --- bin/tests/system/tcp/tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/tests/system/tcp/tests.sh b/bin/tests/system/tcp/tests.sh index 89916d7801..da64c3509f 100644 --- a/bin/tests/system/tcp/tests.sh +++ b/bin/tests/system/tcp/tests.sh @@ -28,6 +28,7 @@ ntcp20=`grep "TCP requests received" ns2/named.stats | tail -1 | awk '{print $1} echo_i "check TCP transport" ret=0 $DIG $DIGOPTS @10.53.0.3 txt.example. > dig.out.3 +sleep 1 $RNDCCMD -s 10.53.0.1 stats > /dev/null 2>&1 $RNDCCMD -s 10.53.0.2 stats > /dev/null 2>&1 ntcp11=`grep "TCP requests received" ns1/named.stats | tail -1 | awk '{print $1}'` @@ -42,6 +43,7 @@ status=`expr $status + $ret` echo_i "check TCP forwarder" ret=0 $DIG $DIGOPTS @10.53.0.4 txt.example. > dig.out.4 +sleep 1 $RNDCCMD -s 10.53.0.1 stats > /dev/null 2>&1 $RNDCCMD -s 10.53.0.2 stats > /dev/null 2>&1 ntcp12=`grep "TCP requests received" ns1/named.stats | tail -1 | awk '{print $1}'`