tests.sh revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
#
# Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id: tests.sh,v 1.3 2011/03/01 23:48:06 tbox Exp $
status=0
n=1
DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p 5300"
do
echo "I:checking that $conf is accepted ($n)"
ret=0
n=`expr $n + 1`
done
do
echo "I:checking that $conf is rejected ($n)"
ret=0
n=`expr $n + 1`
done
echo "I:checking A zone redirect works for nonexist ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect updates statistics ($n)"
ret=0
PRE=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns2/named.stats`
POST=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns2/named.stats`
n=`expr $n + 1`
echo "I:checking AAAA zone redirect works for nonexist ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect works for nonexist ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect doesn't work for acl miss ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect doesn't work for acl miss ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect doesn't work for acl miss ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect works for nonexist authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect works for nonexist authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect works for nonexist authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect doesn't work for acl miss authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect doesn't work for acl miss authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect doesn't work for acl miss authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect works for signed nonexist, DO=0 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect works for signed nonexist, DO=0 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect works for signed nonexist, DO=0 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect fails for signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect fails for signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect fails for signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A zone redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA zone redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY zone redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking zone redirect works (with noerror) when qtype is not found ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking that redirect zones reload correctly"
ret=0
tmp=0
set -- `cat dig.out.ns1.test$n`
sleep 1
done
n=`expr $n + 1`
echo "I:checking A nxdomain-redirect works for nonexist ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA nxdomain-redirect works for nonexist ($n)"
ret=0
PRE_RED=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns4/named.stats`
PRE_SUC=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p" ns4/named.stats`
n=`expr $n + 1`
echo "I:checking AAAA nxdomain-redirect updates statistics ($n)"
ret=0
POST_RED=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns4/named.stats`
POST_SUC=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p" ns4/named.stats`
n=`expr $n + 1`
echo "I:checking ANY nxdomain-redirect works for nonexist ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A nxdomain-redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA nxdomain-redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY nxdomain-redirect works for signed nonexist, DO=0 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A nxdomain-redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA nxdomain-redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY nxdomain-redirect fails for signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking A nxdomain-redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking AAAA nxdomain-redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking ANY nxdomain-redirect fails for nsec3 signed nonexist, DO=1 ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking nxdomain-redirect works (with noerror) when qtype is not found ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking nxdomain-redirect against authoritative zone ($n)"
ret=0
n=`expr $n + 1`
echo "I:exit status: $status"