From ffb7ae8beb9f6101342e63ea7e8b4a8a705e61c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 21 Nov 2019 00:05:58 +0800 Subject: [PATCH] Tune the performance of the jitter test --- bin/tests/system/autosign/ns3/named.conf.in | 2 ++ bin/tests/system/autosign/tests.sh | 21 ++++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bin/tests/system/autosign/ns3/named.conf.in b/bin/tests/system/autosign/ns3/named.conf.in index 6382e94186..08a209c827 100644 --- a/bin/tests/system/autosign/ns3/named.conf.in +++ b/bin/tests/system/autosign/ns3/named.conf.in @@ -101,6 +101,8 @@ zone "jitter.nsec3.example" { allow-update { any; }; auto-dnssec maintain; sig-validity-interval 10 2; + sig-signing-nodes 1000; + sig-signing-signatures 100; }; zone "secure.nsec3.example" { diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index cd2a7dce39..4ab4a535c1 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -103,7 +103,7 @@ checkjitter () { _low=$((_mean-_limit)) _high=$((_mean+_limit)) # Find outliers. - echo_i "checking whether all frequencies falls into <$_low;$_high> interval" + echo_i "checking whether all frequencies fall into <$_low;$_high> range" for _num in $_expiretimes do if [ $_num -gt $_high ] || [ $_num -lt $_low ]; then @@ -1027,19 +1027,14 @@ $KEYGEN -a rsasha1 -3 -q -K ns3 jitter.nsec3.example > /dev/null # Trigger zone signing. $RNDCCMD 10.53.0.3 sign jitter.nsec3.example. 2>&1 | sed 's/^/ns3 /' | cat_i # Wait until zone has been signed. -i=0 -while [ "$i" -lt 20 ]; do - failed=0 - $DIG $DIGOPTS axfr jitter.nsec3.example @10.53.0.3 > dig.out.ns3.test$n || failed=1 - grep "NSEC3PARAM" dig.out.ns3.test$n > /dev/null || failed=1 - [ $failed -eq 0 ] && break - echo_i "waiting ... ($i)" - sleep $((i/5)) - i=$((i+1)) -done -[ $failed != 0 ] && echo_i "error: no NSEC3PARAM found in AXFR" && ret=1 +check_if_nsec3param_exists() { + $DIG $DIGOPTS NSEC3PARAM jitter.nsec3.example @10.53.0.3 > dig.out.ns3.1.test$n || return 1 + grep -q "^jitter\.nsec3\.example\..*NSEC3PARAM" dig.out.ns3.1.test$n || return 1 +} +retry_quiet 20 check_if_nsec3param_exists || ret=1 +$DIG $DIGOPTS AXFR jitter.nsec3.example @10.53.0.3 > dig.out.ns3.2.test$n || ret=1 # Check jitter distribution. -checkjitter dig.out.ns3.test$n || ret=1 +checkjitter dig.out.ns3.2.test$n || ret=1 n=`expr $n + 1` if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret`