tests.sh revision bd334e0366c0f21bf15de9282b02f1bed4ccde14
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#!/bin/sh
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews#
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews# Perform tests
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer#
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny MayerTOP="`cd ../../../..; pwd`"
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny MayerNAMED=$TOP/bin/named/named
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrewsexport NAMED
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrewsif [ -f dig.out.ns2 ]; then
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews rm -f dig.out.ns2
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrewsfi
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrewsif [ -f dig.out.ns3 ]; then
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews rm -f dig.out.ns3
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayerfi
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
90039392500d15bf056ab4505d048fcba0d485dfMark Andrewsstatus=0;
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer @10.53.0.2 a > dig.out.ns2
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayerstatus=`expr $status + $?`
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayergrep ";" dig.out.ns2
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
6ceca14e5ea7972a9ba8bc1dca0de1f63f669cfdDanny Mayer @10.53.0.3 a > dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceperl ../digcomp.pl dig.out.ns2 dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencerm -f ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencecp ns2/example2.db ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencekill -HUP `cat ns2/named.pid`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencesleep 30
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer @10.53.0.2 a > dig.out.ns2
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayerstatus=`expr $status + $?`
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayergrep ";" dig.out.ns2
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayer @10.53.0.3 a > dig.out.ns3
d3243476c280d3a98cadbfd6343437fa2b29356bDanny Mayerstatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceperl ../digcomp.pl dig.out.ns2 dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencekill `cat ns3/named.pid`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencerm -f ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencecp ns2/example3.db ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencekill -HUP `cat ns2/named.pid`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence(cd ns3 ; $NAMED -c named.conf -d 99 -g >> named.run 2>&1 & )
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencesleep 30
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence @10.53.0.2 a > dig.out.ns2
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns2
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence @10.53.0.3 a > dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceperl ../digcomp.pl dig.out.ns2 dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencerm -f ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencekill `cat ns2/named.pid`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencecp ns2/example4.db ns2/a.example.db
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence(cd ns2 ; $NAMED -c named.conf -d 99 -g >> named.run 2>&1 & )
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencesleep 30
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence @10.53.0.2 a > dig.out.ns2
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns2
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence @10.53.0.3 a > dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencegrep ";" dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceperl ../digcomp.pl dig.out.ns2 dig.out.ns3
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencestatus=`expr $status + $?`
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceif [ $status != 0 ]; then
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence echo "FAILED with status $status"
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencefi
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrenceexit $status
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence