1 # Copyright (C) 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.
16 .
$SYSTEMTESTTOP/conf.sh
20 # using delv insecure mode as not testing dnssec here
23 if [ -x ${DELV} ] ; then
25 echo "I:checking delv short form works ($n)"
27 $DELV $DELVOPTS @
10.53.0.3 +short a a.example
> delv.out.
test$n || ret
=1
28 if test `wc -l < delv.out.test$n` != 1 ; then ret
=1 ; fi
29 if [ $ret != 0 ]; then echo "I:failed"; fi
30 status
=`expr $status + $ret`
33 echo "I:checking delv split width works ($n)"
35 $DELV $DELVOPTS @
10.53.0.3 +split=4 -t sshfp foo.example
> delv.out.
test$n || ret
=1
36 grep " 9ABC DEF6 7890 " < delv.out.
test$n > /dev
/null || ret
=1
37 if [ $ret != 0 ]; then echo "I:failed"; fi
38 status
=`expr $status + $ret`
40 echo "I:checking delv with IPv6 on IPv4 does not work ($n)"
42 if $TESTSOCK6 fd92
:7065:b8e
:ffff
::3
45 # following should fail because @IPv4 overrides earlier @IPv6 above
46 # and -6 forces IPv6 so this should fail, such as:
47 # ;; getaddrinfo failed: hostname nor servname provided, or not known
48 # ;; resolution failed: not found
49 # note that delv returns success even on lookup failure
50 $DELV $DELVOPTS @fd92
:7065:b8e
:ffff
::3 @
10.53.0.3 -6 -t txt foo.example
> delv.out.
test$n 2>&1 || ret
=1
51 # it should have no results but error output
52 grep "testing" < delv.out.
test$n > /dev
/null
&& ret
=1
53 grep "getaddrinfo failed:" < delv.out.
test$n > /dev
/null || ret
=1
54 if [ $ret != 0 ]; then echo "I:failed"; fi
55 status
=`expr $status + $ret`
57 echo "I:IPv6 unavailable; skipping"
61 echo "I:checking delv with reverse lookup works ($n)"
63 $DELV $DELVOPTS @
10.53.0.3 -x 127.0.0.1 > delv.out.
test$n 2>&1 || ret
=1
64 # doesn't matter if has answer
65 grep -i "127\.in-addr\.arpa\." < delv.out.
test$n > /dev
/null || ret
=1
66 if [ $ret != 0 ]; then echo "I:failed"; fi
67 status
=`expr $status + $ret`
71 echo "$DELV is needed, so skipping these delv tests"