Skip to content
GitLab
Projects
Groups
Snippets
/
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
f83ebd34
Commit
f83ebd34
authored
Oct 18, 2017
by
Ondřej Surý
Committed by
Stephen Morris
Feb 16, 2018
Browse files
[rt46602] Update server-stale test to run on port passed from run.sh script
parent
fb00f180
Changes
7
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/serve-stale/ans2/ans.pl
→
bin/tests/system/serve-stale/ans2/ans.pl
.in
View file @
f83ebd34
...
...
@@ -25,7 +25,7 @@ $SIG{TERM} = \&rmpid;
my
$send_response
=
1
;
my
$localaddr
=
"
10.53.0.2
";
my
$localport
=
5300
;
my
$localport
=
@PORT@
;
my
$verbose
=
0
;
#
...
...
bin/tests/system/serve-stale/clean.sh
View file @
f83ebd34
...
...
@@ -5,6 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
rm
-f
dig.out.test
*
rm
-f
ns1/named.conf
rm
-f
ns1/named.conf ns1/named.port
rm
-f
ans2/ans.pl ans2/named.port
rm
-f
ns3/named.conf ns3/named.port
rm
-f
ns3/root.bk
rm
-f
rndc.out.test
*
bin/tests/system/serve-stale/ns1/named1.conf
→
bin/tests/system/serve-stale/ns1/named1.conf
.in
View file @
f83ebd34
...
...
@@ -12,14 +12,14 @@ key rndc_key {
};
controls {
inet
10
.
53
.
0
.
1
port
9953
allow
{
any
; }
keys
{
rndc_key
; };
inet 10.53.0.1 port
@CONTROLPORT@
allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port
5300
;
port
@PORT@
;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
...
...
bin/tests/system/serve-stale/ns1/named2.conf
→
bin/tests/system/serve-stale/ns1/named2.conf
.in
View file @
f83ebd34
...
...
@@ -12,14 +12,14 @@ key rndc_key {
};
controls {
inet
10
.
53
.
0
.
1
port
9953
allow
{
any
; }
keys
{
rndc_key
; };
inet 10.53.0.1 port
@CONTROLPORT@
allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port
5300
;
port
@PORT@
;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
...
...
bin/tests/system/serve-stale/ns3/named.conf
→
bin/tests/system/serve-stale/ns3/named.conf
.in
View file @
f83ebd34
...
...
@@ -12,14 +12,14 @@ key rndc_key {
};
controls {
inet
10
.
53
.
0
.
3
port
9953
allow
{
any
; }
keys
{
rndc_key
; };
inet 10.53.0.3 port
@CONTROLPORT@
allow { any; } keys { rndc_key; };
};
options {
query-source address 10.53.0.3;
notify-source 10.53.0.3;
transfer-source 10.53.0.3;
port
5300
;
port
@PORT@
;
pid-file "named.pid";
listen-on { 10.53.0.3; };
listen-on-v6 { none; };
...
...
bin/tests/system/serve-stale/setup.sh
View file @
f83ebd34
#!/bin/sh
# Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
cp
-f
ns1/named1.conf ns1/named.conf
.
../getopts.sh
sed
-e
"s/@PORT@/
${
port
}
/g;s/@CONTROLPORT@/
${
controlport
}
/g"
< ns1/named1.conf.in
>
ns1/named.conf
echo
"
${
port
}
"
>
ns1/named.port
sed
-e
"s/@PORT@/
${
port
}
/g;s/@CONTROLPORT@/
${
controlport
}
/g"
< ans2/ans.pl.in
>
ans2/ans.pl
echo
"
${
port
}
"
>
ans2/named.port
sed
-e
"s/@PORT@/
${
port
}
/g;s/@CONTROLPORT@/
${
controlport
}
/g"
< ns3/named.conf.in
>
ns3/named.conf
echo
"
${
port
}
"
>
ns3/named.port
bin/tests/system/serve-stale/tests.sh
View file @
f83ebd34
...
...
@@ -9,29 +9,41 @@
SYSTEMTESTTOP
=
..
.
$SYSTEMTESTTOP
/conf.sh
RNDCCMD
=
"
$RNDC
-c
$SYSTEMTESTTOP
/common/rndc.conf -p 9953 -s"
.
../getopts.sh
while
getopts
"p:c:"
flag
;
do
case
"
$flag
"
in
p
)
port
=
$OPTARG
;;
c
)
controlport
=
$OPTARG
;;
*
)
exit
1
;;
esac
done
RNDCCMD
=
"
$RNDC
-c
$SYSTEMTESTTOP
/common/rndc.conf -p
${
controlport
}
-s"
echo
"RNDCCMD:
${
RNDCCMD
}
"
status
=
0
n
=
0
#echo "I:check ans.pl server ($n)"
#$DIG -p
5300
@10.53.0.2 example NS
#$DIG -p
5300
@10.53.0.2 example SOA
#$DIG -p
5300
@10.53.0.2 ns.example A
#$DIG -p
5300
@10.53.0.2 ns.example AAAA
#$DIG -p
5300
@10.53.0.2 txt enable
#$DIG -p
5300
@10.53.0.2 txt disable
#$DIG -p
5300
@10.53.0.2 ns.example AAAA
#$DIG -p
5300
@10.53.0.2 txt enable
#$DIG -p
5300
@10.53.0.2 ns.example AAAA
##$DIG -p
5300
@10.53.0.2 data.example TXT
#$DIG -p
5300
@10.53.0.2 nodata.example TXT
#$DIG -p
5300
@10.53.0.2 nxdomain.example TXT
#$DIG -p
${port}
@10.53.0.2 example NS
#$DIG -p
${port}
@10.53.0.2 example SOA
#$DIG -p
${port}
@10.53.0.2 ns.example A
#$DIG -p
${port}
@10.53.0.2 ns.example AAAA
#$DIG -p
${port}
@10.53.0.2 txt enable
#$DIG -p
${port}
@10.53.0.2 txt disable
#$DIG -p
${port}
@10.53.0.2 ns.example AAAA
#$DIG -p
${port}
@10.53.0.2 txt enable
#$DIG -p
${port}
@10.53.0.2 ns.example AAAA
##$DIG -p
${port}
@10.53.0.2 data.example TXT
#$DIG -p
${port}
@10.53.0.2 nodata.example TXT
#$DIG -p
${port}
@10.53.0.2 nxdomain.example TXT
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache data.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -40,7 +52,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache nodata.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -49,7 +61,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache nxdomain.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -58,7 +70,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:disable responses from authoritative server (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.2 txt disable
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.2 txt disable
>
dig.out.test
$n
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"TXT.
\"
0
\"
"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -77,7 +89,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -86,7 +98,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -95,7 +107,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -119,7 +131,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (serve-stale off) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -129,7 +141,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (serve-stale off) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -137,7 +149,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (serve-stale off) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -160,7 +172,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (serve-stale on) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -169,7 +181,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (serve-stale on) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -178,7 +190,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (serve-stale on) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -202,7 +214,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (serve-stale no) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -212,7 +224,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (serve-stale no) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -220,7 +232,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (serve-stale no) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -243,7 +255,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (serve-stale yes) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -252,7 +264,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (serve-stale yes) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -261,7 +273,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (serve-stale yes) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -292,7 +304,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale data.example (serve-stale reset) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -301,7 +313,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nodata.example (serve-stale reset) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -310,7 +322,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check stale nxdomain.example (serve-stale reset) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.1 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -334,7 +346,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:updating ns1/named.conf (
$n
)"
ret
=
0
cp
-f
ns1/named2.conf ns1/named.conf
||
ret
=
1
sed
-e
"s/@PORT@/
${
port
}
/g;s/@CONTROLPORT@/
${
controlport
}
/g"
<
ns1/named2.conf
.in
>
ns1/named.conf
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
...
...
@@ -373,7 +385,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:enable responses from authoritative server (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.2 txt
enable
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.2 txt
enable
>
dig.out.test
$n
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"TXT.
\"
1
\"
"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -382,7 +394,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache data.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -391,7 +403,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache nodata.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -400,7 +412,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:prime cache nxdomain.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -409,7 +421,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:disable responses from authoritative server (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.2 txt disable
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.2 txt disable
>
dig.out.test
$n
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"TXT.
\"
0
\"
"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -428,7 +440,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check fail of data.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 data.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -437,7 +449,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check fail of nodata.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -446,7 +458,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check fail of nxdomain.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: SERVFAIL"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -470,7 +482,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check data.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 data.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 data.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 1,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -479,7 +491,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check nodata.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nodata.example TXT
>
dig.out.test
$n
grep
"status: NOERROR"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
@@ -488,7 +500,7 @@ status=`expr $status + $ret`
n
=
`
expr
$n
+ 1
`
echo
"I:check nxdomain.example (max-stale-ttl default) (
$n
)"
ret
=
0
$DIG
-p
5300
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
$DIG
-p
${
port
}
@10.53.0.3 nxdomain.example TXT
>
dig.out.test
$n
grep
"status: NXDOMAIN"
dig.out.test
$n
>
/dev/null
||
ret
=
1
grep
"ANSWER: 0,"
dig.out.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
...
...
Ondřej Surý
@ondrej
mentioned in commit
8a107c58
·
Feb 21, 2018
mentioned in commit
8a107c58
mentioned in commit 8a107c58f25a192ed37f50de6a55903a5985bd22
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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