Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / zero / tests.sh
blob15c2906a9286292395f05b3cdc23b8a80b12c376
1 # Copyright (C) 2013 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 SYSTEMTESTTOP=..
16 . $SYSTEMTESTTOP/conf.sh
18 status=0
19 echo "I:check lookups against zero TTL records"
20 i=0
21 passes=10
22 $DIG -p 5300 @10.53.0.2 axfr example |
23 awk '$2 == "0" { print "-q", $1, $4; print "-q", "zzz"$1, $4;}' > query.list
24 while [ $i -lt $passes ]
26 ret=0
27 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.1 &
28 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.2 &
29 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.3 &
30 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.4 &
31 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.5 &
32 $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.6 &
33 wait
34 grep "status: SERVFAIL" dig.out$i.1 && ret=1
35 grep "status: SERVFAIL" dig.out$i.2 && ret=1
36 grep "status: SERVFAIL" dig.out$i.3 && ret=1
37 grep "status: SERVFAIL" dig.out$i.5 && ret=1
38 grep "status: SERVFAIL" dig.out$i.6 && ret=1
39 grep "status: SERVFAIL" dig.out$i.6 && ret=1
40 [ $ret = 1 ] && break
41 i=`expr $i + 1`
42 echo "I: successfully completed pass $i of $passes"
43 done
44 if [ $ret != 0 ]; then echo "I:failed"; fi
45 status=`expr $status + $ret`
47 echo "I:exit status: $status"
48 exit $status