3 # Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: tests.sh,v 1.31 2007/06/19 23:47:07 tbox Exp
21 .
$SYSTEMTESTTOP/conf.sh
23 DIGOPTS
="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
27 echo "I:testing basic zone transfer functionality"
28 $DIG $DIGOPTS example. \
29 @
10.53.0.2 axfr
-p 5300 > dig.out.ns2 || status
=1
33 # Spin to allow the zone to tranfer.
38 $DIG $DIGOPTS example. \
39 @
10.53.0.3 axfr
-p 5300 > dig.out.ns3 || tmp
=1
40 grep ";" dig.out.ns3
> /dev
/null
41 if test $?
-ne 0 ; then break; fi
42 echo "I: plain zone re-transfer"
45 if test $tmp -eq 1 ; then status
=1; fi
48 $PERL ..
/digcomp.pl dig1.good
dig.out.ns2 || status
=1
50 $PERL ..
/digcomp.pl dig1.good
dig.out.ns3 || status
=1
52 echo "I:testing TSIG signed zone transfers"
53 $DIG $DIGOPTS tsigzone. \
54 @
10.53.0.2 axfr
-y tsigzone.
:1234abcd8765
-p 5300 \
55 > dig.out.ns2 || status
=1
59 # Spin to allow the zone to tranfer.
64 $DIG $DIGOPTS tsigzone. \
65 @
10.53.0.3 axfr
-y tsigzone.
:1234abcd8765
-p 5300 \
66 > dig.out.ns3 || tmp
=1
67 grep ";" dig.out.ns3
> /dev
/null
68 if test $?
-ne 0 ; then break; fi
69 echo "I: plain zone re-transfer"
72 if test $tmp -eq 1 ; then status
=1; fi
75 $PERL ..
/digcomp.pl
dig.out.ns2
dig.out.ns3 || status
=1
77 echo "I:testing ixfr-from-differences"
80 s/0\.0\.0\.0/0.0.0.1/;
81 s/1397051952/1397051953/
84 $RNDC -c ..
/common
/rndc.conf
-s 10.53.0.2 -p 9953 reload
2>&1 |
sed 's/^/I:ns2 /'
88 $RNDC -c ..
/common
/rndc.conf
-s 10.53.0.3 -p 9953 reload
2>&1 |
sed 's/^/I:ns3 /'
92 $DIG $DIGOPTS example. \
93 @
10.53.0.3 axfr
-p 5300 > dig.out.ns3 || status
=1
96 $PERL ..
/digcomp.pl dig2.good
dig.out.ns3 || status
=1
98 # ns3 has a journal iff it received an IXFR.
99 test -f ns
3/example.bk.jnl || status
=1
101 echo "I:exit status: $status"