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
d9aaf7ac
Commit
d9aaf7ac
authored
Oct 16, 2014
by
Mark Andrews
Browse files
make test more robust in the face of server failures
parent
ca77632f
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/dnssec/tests.sh
View file @
d9aaf7ac
...
...
@@ -2166,14 +2166,14 @@ status=`expr $status + $ret`
echo
"I:checking dnskey query with no data still gets put in cache (
$n
)"
ret
=
0
myDIGOPTS
=
"+noadd +nosea +nostat +noquest +nocomm +nocmd -p 5300 @10.53.0.4"
firstVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|awk
'{ print $2 }'
`
firstVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|
awk
'
$1 != ";;"
{ print $2 }'
`
sleep
1
secondVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|awk
'{ print $2 }'
`
if
[
$firstVal
-eq
$secondVal
]
secondVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|
awk
'
$1 != ";;"
{ print $2 }'
`
if
[
$
{
firstVal
:-
0
}
-eq
$
{
secondVal
:-
0
}
]
then
sleep
1
thirdVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|awk
'{ print $2 }'
`
if
[
$firstVal
-eq
$thirdVal
]
thirdVal
=
`
$DIG
$myDIGOPTS
insecure.example. dnskey|awk
'
$1 != ";;"
{ print $2 }'
`
if
[
$
{
firstVal
:-
0
}
-eq
$
{
thirdVal
:-
0
}
]
then
echo
"I: cannot confirm query answer still in cache"
ret
=
1
...
...
@@ -2339,13 +2339,13 @@ $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload expiring.example 2>&1 |
$RNDC
-c
../common/rndc.conf
-s
10.53.0.4
-p
9953 flush
$DIG
+noall +answer +dnssec +cd
-p
5300 expiring.example soa @10.53.0.4
>
dig.out.ns4.1.
$n
$DIG
+noall +answer +dnssec
-p
5300 expiring.example soa @10.53.0.4
>
dig.out.ns4.2.
$n
ttls
=
`
awk
'{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$ttls
;
do
[
$ttl
-eq
300
]
||
ret
=
1
ttls
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$
{
ttls
:-
0
}
;
do
[
$
{
ttl
:-
0
}
-eq
300
]
||
ret
=
1
done
for
ttl
in
$ttls2
;
do
[
$ttl
-le
60
]
||
ret
=
1
for
ttl
in
$
{
ttls2
:-
0
}
;
do
[
$
{
ttl
:-
0
}
-le
60
]
||
ret
=
1
done
n
=
`
expr
$n
+ 1
`
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -2354,15 +2354,16 @@ status=`expr $status + $ret`
echo
"I:testing TTL is capped at RRSIG expiry time for records in the additional section (
$n
)"
ret
=
0
$RNDC
-c
../common/rndc.conf
-s
10.53.0.4
-p
9953 flush
sleep
1
$DIG
+noall +additional +dnssec +cd
-p
5300 expiring.example mx @10.53.0.4
>
dig.out.ns4.1.
$n
$DIG
+noall +additional +dnssec
-p
5300 expiring.example mx @10.53.0.4
>
dig.out.ns4.2.
$n
ttls
=
`
awk
'{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$ttls
;
do
[
$ttl
-eq
300
]
||
ret
=
1
ttls
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$
{
ttls
:-
0
}
;
do
[
$
{
ttl
:-
0
}
-eq
300
]
||
ret
=
1
done
for
ttl
in
$ttls2
;
do
[
$ttl
-le
60
]
||
ret
=
1
for
ttl
in
$
{
ttls2
:-
0
}
;
do
[
$
{
ttl
:-
0
}
-le
60
]
||
ret
=
1
done
n
=
`
expr
$n
+ 1
`
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -2377,12 +2378,12 @@ ret=0
$RNDC
-c
../common/rndc.conf
-s
10.53.0.4
-p
9953 flush
$DIG
+noall +answer +dnssec +cd
-p
5300 expiring.example soa @10.53.0.4
>
dig.out.ns4.1.
$n
$DIG
+noall +answer +dnssec
-p
5300 expiring.example soa @10.53.0.4
>
dig.out.ns4.2.
$n
ttls
=
`
awk
'{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$ttls
;
do
ttls
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$
{
ttls
:-
0
}
;
do
[
$ttl
-eq
300
]
||
ret
=
1
done
for
ttl
in
$ttls2
;
do
for
ttl
in
$
{
ttls2
:-
0
}
;
do
[
$ttl
-le
120
-a
$ttl
-gt
60
]
||
ret
=
1
done
n
=
`
expr
$n
+ 1
`
...
...
@@ -2393,12 +2394,12 @@ echo "I:testing TTL of expired RRsets with dnssec-accept-expired yes; ($n)"
ret
=
0
$DIG
+noall +answer +dnssec +cd
-p
5300 expired.example soa @10.53.0.4
>
dig.out.ns4.1.
$n
$DIG
+noall +answer +dnssec
-p
5300 expired.example soa @10.53.0.4
>
dig.out.ns4.2.
$n
ttls
=
`
awk
'{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$ttls
;
do
ttls
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$
{
ttls
:-
0
}
;
do
[
$ttl
-eq
300
]
||
ret
=
1
done
for
ttl
in
$ttls2
;
do
for
ttl
in
$
{
ttls2
:-
0
}
;
do
[
$ttl
-le
120
-a
$ttl
-gt
60
]
||
ret
=
1
done
n
=
`
expr
$n
+ 1
`
...
...
@@ -2410,12 +2411,12 @@ ret=0
$RNDC
-c
../common/rndc.conf
-s
10.53.0.4
-p
9953 flush
$DIG
+noall +additional +dnssec +cd
-p
5300 expiring.example mx @10.53.0.4
>
dig.out.ns4.1.
$n
$DIG
+noall +additional +dnssec
-p
5300 expiring.example mx @10.53.0.4
>
dig.out.ns4.2.
$n
ttls
=
`
awk
'{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$ttls
;
do
ttls
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.1.
$n
`
ttls2
=
`
awk
'
$1 != ";;"
{print $2}'
dig.out.ns4.2.
$n
`
for
ttl
in
$
{
ttls
:-
0
}
;
do
[
$ttl
-eq
300
]
||
ret
=
1
done
for
ttl
in
$ttls2
;
do
for
ttl
in
$
{
ttls2
:-
0
}
;
do
[
$ttl
-le
120
-a
$ttl
-gt
60
]
||
ret
=
1
done
n
=
`
expr
$n
+ 1
`
...
...
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