Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / dlvauto / tests.sh
blob6c0e2aa207b3876c2afa19d4a5cb5cc41f58a568
1 # Copyright (C) 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC")
3 # Permission to use, copy, modify, and/or distribute this software for any
4 # purpose with or without fee is hereby granted, provided that the above
5 # copyright notice and this permission notice appear in all copies.
7 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
10 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
12 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13 # PERFORMANCE OF THIS SOFTWARE.
15 # Id: tests.sh,v 1.3 2011/03/03 16:16:46 each Exp
17 SYSTEMTESTTOP=..
18 . $SYSTEMTESTTOP/conf.sh
20 DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
22 status=0
23 n=1
26 # When this was initialy reported there was a REQUIRE failure on restarting.
28 echo "I:checking dnssec-lookaside "'"auto"'"; with views of multiple classes ($n)"
29 if [ -s ns2/named.pid ]
30 then
31 ret=0
32 $PERL $SYSTEMTESTTOP/stop.pl . ns2 || ret=1
33 sleep 1
34 (cd ns2; $NAMED -g -d 100 -c named.conf >> named.run 2>&1 & )
35 sleep 2
36 $DIG $DIGOPTS soa . @10.53.0.2 > dig.out.ns2.test$n || ret=1
37 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
38 if [ $ret != 0 ]; then echo "I:failed"; fi
39 status=`expr $status + $ret`
40 else
41 echo "I:failed"
42 status=1
45 n=`expr $n + 1`
46 echo "I:checking that only the DLV key was imported from bind.keys ($n)"
47 ret=0
48 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 secroots 2>&1 | sed 's/^/I:ns2 /'
49 linecount=`grep "\./RSAMD5/.* ; managed" ns2/named.secroots | wc -l`
50 [ "$linecount" -eq 0 ] || ret=1
51 linecount=`grep "dlv.isc.org/RSAMD5/.* ; managed" ns2/named.secroots | wc -l`
52 [ "$linecount" -eq 2 ] || ret=1
53 linecount=`cat ns2/named.secroots | wc -l`
54 [ "$linecount" -eq 13 ] || ret=1
55 n=`expr $n + 1`
56 if [ $ret != 0 ]; then echo "I:failed"; fi
57 status=`expr $status + $ret`
59 exit $status