Commit e1644895 authored by Mark Andrews's avatar Mark Andrews
Browse files

Merge branch...

Merge branch '760-the-notify-system-test-incorrectly-detects-startup-notify-rate-error-v9_12' into 'v9_12'

Resolve "The notify system test incorrectly detects startup notify rate error."

See merge request !1218
parents 4798c98e 58f8ec2b
Pipeline #7913 passed with stages
in 13 minutes and 40 seconds
...@@ -13,15 +13,17 @@ ...@@ -13,15 +13,17 @@
# Clean up after zone transfer tests. # Clean up after zone transfer tests.
# #
rm -f */named.memstats
rm -f */named.run */named.run.prev
rm -f */named.conf rm -f */named.conf
rm -f */named.memstats
rm -f */named.port rm -f */named.port
rm -f */named.run */named.run.prev
rm -f awk.out.ns?.test*
rm -f dig.out.?.ns5.test* rm -f dig.out.?.ns5.test*
rm -f dig.out.ns2.test* rm -f dig.out.ns2.test*
rm -f dig.out.ns3.test* rm -f dig.out.ns3.test*
rm -f dig.out.ns4.test* rm -f dig.out.ns4.test*
rm -f log.out rm -f log.out
rm -f ns*/managed-keys.bind* ns*/*.mkeys*
rm -f ns*/named.lock rm -f ns*/named.lock
rm -f ns2/example.db rm -f ns2/example.db
rm -f ns2/x21.db* rm -f ns2/x21.db*
......
...@@ -53,12 +53,34 @@ status=`expr $ret + $status` ...@@ -53,12 +53,34 @@ status=`expr $ret + $status`
n=`expr $n + 1` n=`expr $n + 1`
echo_i "checking startup notify rate limit ($n)" echo_i "checking startup notify rate limit ($n)"
ret=0 ret=0
grep 'x[0-9].*sending notify to' ns2/named.run | awk '/x[0-9].*sending notify to/ {
sed 's/.*:\([0-9][0-9]\)\..*/\1/' | uniq -c | awk '{print $1}' > log.out split($2, a, ":");
# the notifies should span at least 4 seconds this = a[1] * 3600 + a[2] * 60 + a[3];
wc -l log.out | awk '$1 < 4 { exit(1) }' || ret=1 if (lasta1 && lasta1 > a[1]) {
# ... with no more than 5 in any one second fix = 3600 * 24;
awk '$1 > 5 { exit(1) }' log.out || ret=1 }
this += fix;
if (last) {
delta = this - last;
print delta;
if (!maxdelta || delta > maxdelta) {
maxdelta = delta;
}
if (!mindelta || delta < mindelta) {
mindelta = delta;
}
}
lasta1 = a[1];
last = this;
count++;
}
END {
print "mindelta:", mindelta
print "maxdelta:" maxdelta
print "count:", count;
if (mindelta < 0.180) exit(1);
if (count < 20) exit(1);
}' ns2/named.run > awk.out.ns2.test$n || ret=1
[ $ret = 0 ] || echo_i "failed" [ $ret = 0 ] || echo_i "failed"
status=`expr $ret + $status` status=`expr $ret + $status`
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment