3 # Copyright (C) 2004, 2007, 2011-2013 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.16 2011/11/02 23:46:24 tbox Exp
21 .
$SYSTEMTESTTOP/conf.sh
24 echo "I:check that the stub zone has been saved to disk"
25 for i
in 1 2 3 4 5 6 7 8 9 20
27 [ -f ns
3/child.example.st
] && break
30 [ -f ns
3/child.example.st
] ||
{ status
=1; echo "I:failed"; }
35 echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
37 $DIG +tcp child.example. @
10.53.0.3 axfr
-p 5300 > dig.out.ns3 || ret
=1
38 grep "; Transfer failed." dig.out.ns3
> /dev
/null || ret
=1
39 [ $ret = 0 ] ||
{ status
=1; echo "I:failed"; }
41 echo "I:look for stub zone data without recursion (should not be found) (pass=$pass)"
42 for i
in 1 2 3 4 5 6 7 8 9
45 $DIG +tcp
+norec data.child.example. \
46 @
10.53.0.3 txt
-p 5300 > dig.out.ns3 || ret
=1
47 grep "status: NOERROR" dig.out.ns3
> /dev
/null || ret
=1
51 $PERL ..
/digcomp.pl knowngood.
dig.out.norec
dig.out.ns3 || ret
=1
52 [ $ret = 0 ] ||
{ status
=1; echo "I:failed"; }
54 echo "I:look for stub zone data with recursion (should be found) (pass=$pass)"
56 $DIG +tcp
+noauth
+noadd data.child.example. @
10.53.0.3 txt
-p 5300 > dig.out.ns3 || ret
=1
57 $PERL ..
/digcomp.pl knowngood.
dig.out.rec
dig.out.ns3 || ret
=1
58 [ $ret = 0 ] ||
{ status
=1; echo "I:failed"; }
61 echo "I:stopping stub server"
62 $PERL $SYSTEMTESTTOP/stop.pl . ns3
64 echo "I:re-starting stub server"
65 $PERL $SYSTEMTESTTOP/start.pl
--noclean --restart . ns3
69 echo "I:exit status: $status"