work around NetBSD /bin/sh bug, with the side effect of making the
test script shorter
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
# SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.19 2000/07/05 20:56:11 bwelling Exp $
|
||||
# $Id: tests.sh,v 1.20 2000/07/05 22:13:56 gson Exp $
|
||||
|
||||
#
|
||||
# Perform tests
|
||||
@@ -25,18 +25,16 @@ SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
status=0
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
|
||||
grep ";" dig.out.ns2
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
|
||||
grep ";" dig.out.ns3
|
||||
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
|
||||
|
||||
rm -f ns2/example.db
|
||||
cp ns2/example2.db ns2/example.db
|
||||
@@ -45,17 +43,14 @@ kill -HUP `cat ns2/named.pid`
|
||||
sleep 60
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
|
||||
grep ";" dig.out.ns2
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
|
||||
grep ";" dig.out.ns3
|
||||
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
|
||||
|
||||
kill -TERM `cat ns3/named.pid`
|
||||
rm -f ns2/example.db
|
||||
@@ -65,7 +60,7 @@ sleep 6
|
||||
if [ -f ns3/named.pid ]; then
|
||||
echo "I: ns3 didn't die when sent a SIGTERM"
|
||||
kill -KILL `cat ns3/named.pid`
|
||||
status=`expr $status + 1`
|
||||
status=1
|
||||
fi
|
||||
|
||||
kill -HUP `cat ns2/named.pid`
|
||||
@@ -73,17 +68,14 @@ kill -HUP `cat ns2/named.pid`
|
||||
sleep 60
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
|
||||
grep ";" dig.out.ns2
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
|
||||
grep ";" dig.out.ns3
|
||||
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
|
||||
|
||||
rm -f ns2/example.db
|
||||
kill -TERM `cat ns2/named.pid`
|
||||
@@ -92,7 +84,7 @@ sleep 6
|
||||
if [ -f ns2/named.pid ]; then
|
||||
echo "I: ns2 didn't die when sent a SIGTERM"
|
||||
kill -KILL `cat ns2/named.pid`
|
||||
status=`expr $status + 1`
|
||||
status=1
|
||||
fi
|
||||
|
||||
cp ns2/example4.db ns2/example.db
|
||||
@@ -101,17 +93,14 @@ sleep 6
|
||||
sleep 60
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
|
||||
grep ";" dig.out.ns2
|
||||
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
@10.53.0.3 a -p 5300 > dig.out.ns3 || status=1
|
||||
grep ";" dig.out.ns3
|
||||
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3
|
||||
status=`expr $status + $?`
|
||||
$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
|
||||
|
||||
echo "I: exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user