Commit 717c2b96 authored by Curtis Blackburn's avatar Curtis Blackburn
Browse files

4125. [test] Added tests for dig, renamed delv test to digdelv.

                        [RT #39490]
parent 9e5390f3
......@@ -66,7 +66,7 @@ RANDFILE=$TOP/bin/tests/system/random.data
# v6synth
SUBDIRS="acl additional allow_query addzone autosign builtin
cacheclean case checkconf @CHECKDS@ checknames checkzone
@COVERAGE@ database delv dlv dlvauto dlz dlzexternal dname
@COVERAGE@ database digdelv dlv dlvauto dlz dlzexternal dname
dns64 dnssec dsdigest dscp ecdsa ednscompliance emptyzones
filter-aaaa formerr forward geoip glue gost ixfr inline
legacy limits logfileconfig lwresd
......
......@@ -14,6 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
rm -f dig.out.test*
rm -f delv.out.test*
rm -f */named.memstats
rm -f */named.run
......
......@@ -17,6 +17,47 @@ SYSTEMTESTTOP=..
status=0
n=0
# using dig insecure mode as not testing dnssec here
DIGOPTS="-i -p 5300"
if [ -x ${DIG} ] ; then
n=`expr $n + 1`
echo "I:checking dig short form works ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.3 +short a a.example > dig.out.test$n || ret=1
if test `wc -l < dig.out.test$n` != 1 ; then ret=1 ; fi
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo "I:checking dig split width works ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.3 +split=4 -t sshfp foo.example > dig.out.test$n || ret=1
grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo "I:checking dig with reverse lookup works ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.3 -x 127.0.0.1 > dig.out.test$n 2>&1 || ret=1
# doesn't matter if has answer
grep -i "127\.in-addr\.arpa\." < dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo "I:checking dig over TCP works ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
grep "10\.0\.0\.1$" < dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
else
echo "$DIG is needed, so skipping these dig tests"
fi
# using delv insecure mode as not testing dnssec here
DELVOPTS="-i -p 5300"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment