|
|
|
@@ -14,54 +14,60 @@
|
|
|
|
|
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
# PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
|
|
# $Id: tests.sh,v 1.5 2007/06/19 23:47:05 tbox Exp $
|
|
|
|
|
# $Id: tests.sh,v 1.6 2008/04/24 21:50:27 each Exp $
|
|
|
|
|
|
|
|
|
|
SYSTEMTESTTOP=..
|
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
|
|
|
|
|
|
|
|
|
status=0
|
|
|
|
|
|
|
|
|
|
if grep -q "^#define DNS_RDATASET_FIXED" $TOP/config.h; then
|
|
|
|
|
test_fixed=true
|
|
|
|
|
else
|
|
|
|
|
echo "I: Order 'fixed' disabled at compile time"
|
|
|
|
|
test_fixed=false
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order fixed (master)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.1 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
if $test_fixed; then
|
|
|
|
|
echo "I: Checking order fixed (master)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.1 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order cyclic (master)"
|
|
|
|
|
ret=0
|
|
|
|
|
match1=0
|
|
|
|
|
match2=0
|
|
|
|
|
match3=0
|
|
|
|
|
match4=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
matches=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.1 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 || \
|
|
|
|
|
ret=1
|
|
|
|
|
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 && match1=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 && match2=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 && match3=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 && match4=1
|
|
|
|
|
|
|
|
|
|
j=`expr $i % 4`
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.1 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
if [ $i -le 4 ]; then
|
|
|
|
|
cp dig.out.cyclic dig.out.$j
|
|
|
|
|
else
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.$j && matches=`expr $matches + 1`
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
match=`expr $match1 + $match2 + $match3 + $match4`
|
|
|
|
|
if [ $match != 4 ]; then ret=1; fi
|
|
|
|
|
cmp -s dig.out.0 dig.out.1 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.2 dig.out.3 && ret=1
|
|
|
|
|
if [ $matches -ne 16 ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
@@ -96,44 +102,43 @@ status=`expr $status + $ret`
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order fixed (slave)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
if $test_fixed; then
|
|
|
|
|
echo "I: Checking order fixed (slave)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order cyclic (slave)"
|
|
|
|
|
ret=0
|
|
|
|
|
match1=0
|
|
|
|
|
match2=0
|
|
|
|
|
match3=0
|
|
|
|
|
match4=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
matches=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 || \
|
|
|
|
|
ret=1
|
|
|
|
|
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 && match1=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 && match2=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 && match3=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 && match4=1
|
|
|
|
|
|
|
|
|
|
j=`expr $i % 4`
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
if [ $i -le 4 ]; then
|
|
|
|
|
cp dig.out.cyclic dig.out.$j
|
|
|
|
|
else
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.$j && matches=`expr $matches + 1`
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
match=`expr $match1 + $match2 + $match3 + $match4`
|
|
|
|
|
if [ $match != 4 ]; then ret=1; fi
|
|
|
|
|
cmp -s dig.out.0 dig.out.1 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.2 dig.out.3 && ret=1
|
|
|
|
|
if [ $matches -ne 16 ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
@@ -184,44 +189,43 @@ echo "I: Re-starting slave"
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order fixed (slave loaded from disk)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
if $test_fixed; then
|
|
|
|
|
echo "I: Checking order fixed (slave loaded from disk)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order cyclic (slave loaded from disk)"
|
|
|
|
|
ret=0
|
|
|
|
|
match1=0
|
|
|
|
|
match2=0
|
|
|
|
|
match3=0
|
|
|
|
|
match4=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
matches=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 || \
|
|
|
|
|
ret=1
|
|
|
|
|
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 && match1=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 && match2=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 && match3=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 && match4=1
|
|
|
|
|
|
|
|
|
|
j=`expr $i % 4`
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.2 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
if [ $i -le 4 ]; then
|
|
|
|
|
cp dig.out.cyclic dig.out.$j
|
|
|
|
|
else
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.$j && matches=`expr $matches + 1`
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
match=`expr $match1 + $match2 + $match3 + $match4`
|
|
|
|
|
if [ $match != 4 ]; then ret=1; fi
|
|
|
|
|
cmp -s dig.out.0 dig.out.1 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.2 dig.out.3 && ret=1
|
|
|
|
|
if [ $matches -ne 16 ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
@@ -256,44 +260,43 @@ status=`expr $status + $ret`
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order fixed (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.3 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
if $test_fixed; then
|
|
|
|
|
echo "I: Checking order fixed (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.3 fixed.example > dig.out.fixed || ret=1
|
|
|
|
|
cmp -s dig.out.fixed dig.out.fixed.good || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
echo "I: Checking order cyclic (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
match1=0
|
|
|
|
|
match2=0
|
|
|
|
|
match3=0
|
|
|
|
|
match4=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
|
|
|
matches=0
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
|
|
|
do
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.3 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 || \
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 || \
|
|
|
|
|
ret=1
|
|
|
|
|
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good1 && match1=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good2 && match2=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good3 && match3=1
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.cyclic.good4 && match4=1
|
|
|
|
|
|
|
|
|
|
j=`expr $i % 4`
|
|
|
|
|
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
|
|
|
|
-p 5300 @10.53.0.3 cyclic.example > dig.out.cyclic || ret=1
|
|
|
|
|
if [ $i -le 4 ]; then
|
|
|
|
|
cp dig.out.cyclic dig.out.$j
|
|
|
|
|
else
|
|
|
|
|
cmp -s dig.out.cyclic dig.out.$j && matches=`expr $matches + 1`
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
match=`expr $match1 + $match2 + $match3 + $match4`
|
|
|
|
|
if [ $match != 4 ]; then ret=1; fi
|
|
|
|
|
cmp -s dig.out.0 dig.out.1 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.0 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.2 && ret=1
|
|
|
|
|
cmp -s dig.out.1 dig.out.3 && ret=1
|
|
|
|
|
cmp -s dig.out.2 dig.out.3 && ret=1
|
|
|
|
|
if [ $matches -ne 16 ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|