Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / stub / tests.sh
blobaaf6c1a2a426909d6b6ae547b92437a0bfb76aa1
1 #!/bin/sh
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
20 SYSTEMTESTTOP=..
21 . $SYSTEMTESTTOP/conf.sh
23 status=0
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 ns3/child.example.st ] && break
28 sleep 1
29 done
30 [ -f ns3/child.example.st ] || { status=1; echo "I:failed"; }
32 for pass in 1 2
35 echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
36 ret=0
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
44 ret=0
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
48 [ $ret = 0 ] && break
49 sleep 1
50 done
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)"
55 ret=0
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"; }
60 [ $pass = 1 ] && {
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
67 done
69 echo "I:exit status: $status"
70 exit $status