Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / wildcard / tests.sh
blobb0bc499bc20f7d6d831e72bfc4c6e60891c4168a
1 #!/bin/sh
3 # Copyright (C) 2012, 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.1.2.3 2010/06/01 06:57:31 marka Exp
19 SYSTEMTESTTOP=..
20 . $SYSTEMTESTTOP/conf.sh
22 status=0
23 n=0
25 rm -f dig.out.*
27 DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
29 n=`expr $n + 1`
30 echo "I: checking that NSEC wildcard non-existance proof is returned auth ($n)"
31 ret=0
32 $DIG $DIGOPTS a b.wild.nsec +norec @10.53.0.1 > dig.out.ns1.test$n || ret=1
33 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns1.test$n > /dev/null || ret=1
34 if [ $ret != 0 ]; then echo "I:failed"; fi
35 status=`expr $status + $ret`
37 n=`expr $n + 1`
38 echo "I: checking that NSEC wildcard non-existance proof is returned non-validating ($n)"
39 ret=0
40 $DIG $DIGOPTS a b.wild.nsec @10.53.0.2 > dig.out.ns2.test$n || ret=1
41 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns2.test$n > /dev/null || ret=1
42 grep -i 'flags:.* ad[ ;]' dig.out.ns2.test$n > /dev/null && ret=1
43 if [ $ret != 0 ]; then echo "I:failed"; fi
44 status=`expr $status + $ret`
46 n=`expr $n + 1`
47 echo "I: checking that NSEC wildcard non-existance proof is returned validating ($n)"
48 ret=0
49 $DIG $DIGOPTS a b.wild.nsec @10.53.0.3 > dig.out.ns3.test$n || ret=1
50 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns3.test$n > /dev/null || ret=1
51 grep -i 'flags:.* ad[ ;]' dig.out.ns3.test$n > /dev/null || ret=1
52 if [ $ret != 0 ]; then echo "I:failed"; fi
53 status=`expr $status + $ret`
55 n=`expr $n + 1`
56 echo "I: checking that NSEC wildcard non-existance proof is returned validating + CD ($n)"
57 ret=0
58 $DIG $DIGOPTS +cd a b.wild.nsec @10.53.0.5 > dig.out.ns5.test$n || ret=1
59 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns5.test$n > /dev/null || ret=1
60 grep -i 'flags:.* ad[ ;]' dig.out.ns5.test$n > /dev/null && ret=1
61 if [ $ret != 0 ]; then echo "I:failed"; fi
62 status=`expr $status + $ret`
63 n=`expr $n + 1`
65 echo "I: checking that returned NSEC wildcard non-existance proof validates ($n)"
66 ret=0
67 $DIG $DIGOPTS a b.wild.nsec @10.53.0.4 > dig.out.ns4.test$n || ret=1
68 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC' dig.out.ns4.test$n > /dev/null || ret=1
69 grep -i 'flags:.* ad[ ;]' dig.out.ns4.test$n > /dev/null || ret=1
70 if [ $ret != 0 ]; then echo "I:failed"; fi
71 status=`expr $status + $ret`
73 n=`expr $n + 1`
74 echo "I: checking that NSEC wildcard non-existance proof is returned private, validating ($n)"
75 ret=0
76 $DIG $DIGOPTS a b.wild.private.nsec @10.53.0.3 > dig.out.ns3.test$n || ret=1
77 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC' dig.out.ns3.test$n > /dev/null || ret=1
78 grep -i 'flags:.* ad[ ;]' dig.out.ns3.test$n > /dev/null && ret=1
79 if [ $ret != 0 ]; then echo "I:failed"; fi
80 status=`expr $status + $ret`
82 n=`expr $n + 1`
83 echo "I: checking that returned NSEC wildcard non-existance proof for private zone validates ($n)"
84 ret=0
85 $DIG $DIGOPTS a b.wild.private.nsec @10.53.0.4 > dig.out.ns4.test$n || ret=1
86 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC' dig.out.ns4.test$n > /dev/null || ret=1
87 grep -i 'flags:.* ad[ ;]' dig.out.ns4.test$n > /dev/null || ret=1
88 if [ $ret != 0 ]; then echo "I:failed"; fi
89 status=`expr $status + $ret`
91 n=`expr $n + 1`
92 echo "I: checking that NSEC3 wildcard non-existance proof is returned auth ($n)"
93 ret=0
94 $DIG $DIGOPTS a b.wild.nsec3 +norec @10.53.0.1 > dig.out.ns1.test$n || ret=1
95 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns1.test$n > /dev/null || ret=1
96 if [ $ret != 0 ]; then echo "I:failed"; fi
97 status=`expr $status + $ret`
99 n=`expr $n + 1`
100 echo "I: checking that NSEC3 wildcard non-existance proof is returned non-validating ($n)"
101 ret=0
102 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.2 > dig.out.ns2.test$n || ret=1
103 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns2.test$n > /dev/null || ret=1
104 grep -i 'flags:.* ad[ ;]' dig.out.ns2.test$n > /dev/null && ret=1
105 if [ $ret != 0 ]; then echo "I:failed"; fi
106 status=`expr $status + $ret`
108 n=`expr $n + 1`
109 echo "I: checking that NSEC3 wildcard non-existance proof is returned validating ($n)"
110 ret=0
111 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
112 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns3.test$n > /dev/null || ret=1
113 grep -i 'flags:.* ad[ ;]' dig.out.ns3.test$n > /dev/null || ret=1
114 if [ $ret != 0 ]; then echo "I:failed"; fi
115 status=`expr $status + $ret`
117 n=`expr $n + 1`
118 echo "I: checking that NSEC3 wildcard non-existance proof is returned validating + CD ($n)"
119 ret=0
120 $DIG $DIGOPTS +cd a b.wild.nsec3 @10.53.0.5 > dig.out.ns5.test$n || ret=1
121 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns5.test$n > /dev/null || ret=1
122 grep -i 'flags:.* ad[ ;]' dig.out.ns5.test$n > /dev/null && ret=1
123 if [ $ret != 0 ]; then echo "I:failed"; fi
124 status=`expr $status + $ret`
126 n=`expr $n + 1`
127 echo "I: checking that returned NSEC3 wildcard non-existance proof validates ($n)"
128 ret=0
129 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.4 > dig.out.ns4.test$n || ret=1
130 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A' dig.out.ns4.test$n > /dev/null || ret=1
131 grep -i 'flags:.* ad[ ;]' dig.out.ns4.test$n > /dev/null || ret=1
132 if [ $ret != 0 ]; then echo "I:failed"; fi
133 status=`expr $status + $ret`
135 n=`expr $n + 1`
136 echo "I: checking that NSEC3 wildcard non-existance proof is returned private, validating ($n)"
137 ret=0
138 $DIG $DIGOPTS a b.wild.private.nsec3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
139 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns3.test$n > /dev/null || ret=1
140 grep -i 'flags:.* ad[ ;]' dig.out.ns3.test$n > /dev/null && ret=1
141 if [ $ret != 0 ]; then echo "I:failed"; fi
142 status=`expr $status + $ret`
144 n=`expr $n + 1`
145 echo "I: checking that returned NSEC3 wildcard non-existance proof for private zone validates ($n)"
146 ret=0
147 $DIG $DIGOPTS a b.wild.private.nsec3 @10.53.0.4 > dig.out.ns4.test$n || ret=1
148 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns4.test$n > /dev/null || ret=1
149 grep -i 'flags:.* ad[ ;]' dig.out.ns4.test$n > /dev/null || ret=1
150 if [ $ret != 0 ]; then echo "I:failed"; fi
151 status=`expr $status + $ret`
153 echo "I:exit status: $status"
154 exit $status