tests.sh revision 2b96f36d0c405a47cd3993d828faf87c791e4253
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Permission to use, copy, modify, and/or distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# copyright notice and this permission notice appear in all copies.
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# PERFORMANCE OF THIS SOFTWARE.
d48730a446ffffa8d75462a4abefce030425fa64Mark Andrews# $Id: tests.sh,v 1.4.154.1 2012/01/04 20:05:03 smann Exp $
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark AndrewsDIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark AndrewsRNDCCMD="$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf"
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrewsecho "I:preparing ($n)"
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrews$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrewsserver 10.53.0.2
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrewsupdate add text1.nil. 600 IN TXT "addition 1"
d1cacbb37474b0cbee6c1ddd05d27f731b2b43baMark Andrewsupdate add text1.other. 600 IN TXT "addition 1"
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
echo "I: verifying adb records in named.stats ($n)"
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 2h nta1.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 1d nta2.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 1w nta3.example 2>&1 | grep "Negative trust anchor added" > /dev/null || ret=1
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf nta -l 8d nta4.example 2>&1 | grep "NTA lifetime cannot exceed one week" > /dev/null || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r flush '"view with a space"' 2>&1 > rndc.output.test$n || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output.test$n /dev/null 2>&1 || ret=1
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
n=`expr $n + 1`
sed -n "$cur,"'$p' < ns6/named.run | grep "any newly configured zones are now loaded" > /dev/null && {
ret=0
n=`expr $n + 1`
if [ -x "$PYTHON" ]; then
n=`expr $n + 1`
exit $status