Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
47a4e0ee
Commit
47a4e0ee
authored
Dec 05, 2018
by
Mark Andrews
Browse files
check that the time between notify messages is not too small
parent
ff20b804
Pipeline
#7906
passed with stages
in 19 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/notify/clean.sh
View file @
47a4e0ee
...
...
@@ -13,15 +13,17 @@
# Clean up after zone transfer tests.
#
rm
-f
*
/named.memstats
rm
-f
*
/named.run
*
/named.run.prev
rm
-f
*
/named.conf
rm
-f
*
/named.memstats
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.ns2.test
*
rm
-f
dig.out.ns3.test
*
rm
-f
dig.out.ns4.test
*
rm
-f
log.out
rm
-f
ns
*
/managed-keys.bind
*
ns
*
/
*
.mkeys
*
rm
-f
ns
*
/named.lock
rm
-f
ns2/example.db
rm
-f
ns2/x21.db
*
...
...
@@ -33,4 +35,3 @@ rm -f ns5/x21.bk-c
rm
-f
ns5/x21.bk-c.jnl
rm
-f
ns5/x21.db.jnl
rm
-f
tmp
rm
-f
ns
*
/managed-keys.bind
*
ns
*
/
*
.mkeys
*
bin/tests/system/notify/tests.sh
View file @
47a4e0ee
...
...
@@ -53,12 +53,34 @@ status=`expr $ret + $status`
n
=
`
expr
$n
+ 1
`
echo_i
"checking startup notify rate limit (
$n
)"
ret
=
0
grep
'x[0-9].*sending notify to'
ns2/named.run |
sed
's/.*:\([0-9][0-9]\)\..*/\1/'
|
uniq
-c
|
awk
'{print $1}'
>
log.out
# the notifies should span at least 4 seconds
wc
-l
log.out |
awk
'$1 < 4 { exit(1) }'
||
ret
=
1
# ... with no more than 5 in any one second
awk
'$1 > 5 { exit(1) }'
log.out
||
ret
=
1
awk
'/x[0-9].*sending notify to/ {
split($2, a, ":");
this = a[1] * 3600 + a[2] * 60 + a[3];
if (lasta1 && lasta1 > a[1]) {
fix = 3600 * 24;
}
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"
status
=
`
expr
$ret
+
$status
`
...
...
Mark Andrews
@marka
mentioned in commit
58f8ec2b
·
Dec 11, 2018
mentioned in commit
58f8ec2b
mentioned in commit 58f8ec2b36f0298a36f27fa3c24afcb528b6a101
Toggle commit list
Mark Andrews
@marka
mentioned in commit
c5f85f80
·
Dec 11, 2018
mentioned in commit
c5f85f80
mentioned in commit c5f85f808c051f2b8e97f8aa61482c2378aa6c39
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment