3 # Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: tests.sh,v 1.7 2011/11/06 23:46:40 tbox Exp
20 .
$SYSTEMTESTTOP/conf.sh
27 echo "I:test with RT, single zone ($n)"
29 $DIG -t RT rt.rt.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
30 if [ $ret -eq 1 ] ; then
31 echo "I: failed"; status
=1
35 echo "I:test with RT, two zones ($n)"
37 $DIG -t RT rt.rt2.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
38 if [ $ret -eq 1 ] ; then
39 echo "I: failed"; status
=1
43 echo "I:test with NAPTR, single zone ($n)"
45 $DIG -t NAPTR nap.naptr.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
46 if [ $ret -eq 1 ] ; then
47 echo "I: failed"; status
=1
51 echo "I:test with NAPTR, two zones ($n)"
53 $DIG -t NAPTR nap.hang3b.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
54 if [ $ret -eq 1 ] ; then
55 echo "I: failed"; status
=1
59 echo "I:test with LP ($n)"
61 $DIG -t LP nid2.nid.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
62 if [ $minimal = no
] ; then
63 grep "L64" dig.out.
$n > /dev
/null || ret
=1
64 grep "L32" dig.out.
$n > /dev
/null || ret
=1
66 grep "L64" dig.out.
$n > /dev
/null
&& ret
=1
67 grep "L32" dig.out.
$n > /dev
/null
&& ret
=1
69 if [ $ret -eq 1 ] ; then
70 echo "I: failed"; status
=1
74 echo "I:test with NID ($n)"
76 $DIG -t NID ns1.nid.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
77 if [ $minimal = no
] ; then
78 # change && to || when we support NID additional processing
79 grep "L64" dig.out.
$n > /dev
/null
&& ret
=1
80 grep "L32" dig.out.
$n > /dev
/null
&& ret
=1
82 grep "L64" dig.out.
$n > /dev
/null
&& ret
=1
83 grep "L32" dig.out.
$n > /dev
/null
&& ret
=1
85 if [ $ret -eq 1 ] ; then
86 echo "I: failed"; status
=1
90 echo "I:test with NID + LP ($n)"
92 $DIG -t NID nid2.nid.example @
10.53.0.1 -p 5300 > dig.out.
$n || ret
=1
93 if [ $minimal = no
] ; then
94 # change && to || when we support NID additional processing
95 grep "LP" dig.out.
$n > /dev
/null
&& ret
=1
96 grep "L64" dig.out.
$n > /dev
/null
&& ret
=1
97 grep "L32" dig.out.
$n > /dev
/null
&& ret
=1
99 grep "LP" dig.out.
$n > /dev
/null
&& ret
=1
100 grep "L64" dig.out.
$n > /dev
/null
&& ret
=1
101 grep "L32" dig.out.
$n > /dev
/null
&& ret
=1
103 if [ $ret -eq 1 ] ; then
104 echo "I: failed"; status
=1
108 echo "I:testing with 'minimal-responses yes;'"
112 echo "I:reconfiguring server"
113 cp ns
1/named2.conf ns
1/named.conf
114 $RNDC -c ..
/common
/rndc.conf
-s 10.53.0.1 -p 9953 reconfig
2>&1 |
sed 's/^/I:ns1 /'
117 echo "I:testing with 'minimal-responses no;'"