2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-04 16:45:24 +00:00

fix notify test

test the average delay between notifies instead of the minimum delay;
this helps avoid unnecessary test failures on systems with bursty
network performance.
This commit is contained in:
Evan Hunt
2019-01-22 22:24:24 -08:00
parent 10aba2cbbb
commit 6881f919e7

View File

@@ -63,6 +63,8 @@ awk '/x[0-9].*sending notify to/ {
if (last) {
delta = this - last;
print delta;
total += delta;
if (!maxdelta || delta > maxdelta) {
maxdelta = delta;
}
@@ -75,10 +77,12 @@ awk '/x[0-9].*sending notify to/ {
count++;
}
END {
print "mindelta:", mindelta
print "maxdelta:" maxdelta
average = total / count;
print "mindelta:", mindelta;
print "maxdelta:" maxdelta;
print "count:", count;
if (mindelta < 0.180) exit(1);
print "average:", average;
if (average < 0.180) exit(1);
if (count < 20) exit(1);
}' ns2/named.run > awk.out.ns2.test$n || ret=1
[ $ret = 0 ] || echo_i "failed"