#
# Copyright (C) 2006-2008, 2011, 2012, 2014-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/.
DIGOPTS="+nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short +nocookie"
status=0
test_fixed=true
else
echo "I: Order 'fixed' disabled at compile time"
test_fixed=false
fi
#
#
#
if $test_fixed; then
echo "I: Checking order fixed (master)"
ret=0
do
done
else
echo "I: Checking order fixed behaves as cyclic when disabled (master)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
fi
#
#
#
echo "I: Checking order cyclic (master + additional)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
#
#
#
echo "I: Checking order cyclic (master)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
echo "I: Checking order random (master)"
ret=0
do
eval match$i=0
done
do
match=0
do
eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
done
done
match=0
do
eval "match=\`expr \$match + \$match$i\`"
done
echo "I: Random selection return $match of 24 possible orders in 36 samples"
#
#
#
if $test_fixed; then
echo "I: Checking order fixed (slave)"
ret=0
do
done
fi
#
#
#
echo "I: Checking order cyclic (slave + additional)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
#
#
#
echo "I: Checking order cyclic (slave)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
echo "I: Checking order random (slave)"
ret=0
do
eval match$i=0
done
do
match=0
do
eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
done
done
match=0
do
eval "match=\`expr \$match + \$match$i\`"
done
echo "I: Random selection return $match of 24 possible orders in 36 samples"
echo "I: Shutting down slave"
(cd ..; $SHELL stop.sh rrsetorder ns2 )
echo "I: Checking for slave's on disk copy of zone"
then
echo "I:failed";
fi
echo "I: Re-starting slave"
(cd ..; $SHELL start.sh --noclean rrsetorder ns2 )
#
#
#
if $test_fixed; then
echo "I: Checking order fixed (slave loaded from disk)"
ret=0
do
done
fi
#
#
#
echo "I: Checking order cyclic (slave + additional, loaded from disk)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
#
#
#
echo "I: Checking order cyclic (slave loaded from disk)"
ret=0
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
echo "I: Checking order random (slave loaded from disk)"
ret=0
do
eval match$i=0
done
do
match=0
do
eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
done
done
match=0
do
eval "match=\`expr \$match + \$match$i\`"
done
echo "I: Random selection return $match of 24 possible orders in 36 samples"
#
#
#
if $test_fixed; then
echo "I: Checking order fixed (cache)"
ret=0
do
done
fi
#
#
#
echo "I: Checking order cyclic (cache + additional)"
ret=0
# prime acache
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
#
#
#
echo "I: Checking order cyclic (cache)"
ret=0
# prime acache
matches=0
do
j=`expr $i % 4`
if [ $i -le 4 ]; then
else
fi
done
echo "I: Checking order random (cache)"
ret=0
do
eval match$i=0
done
do
match=0
do
eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
done
done
match=0
do
eval "match=\`expr \$match + \$match$i\`"
done
echo "I: Random selection return $match of 24 possible orders in 36 samples"
echo "I: Checking default order no match in rrset-order (random)"
ret=0
do
eval match$i=0
done
do
match=0
do
eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
done
done
match=0
do
eval "match=\`expr \$match + \$match$i\`"
done
echo "I: Random selection return $match of 24 possible orders in 36 samples"
echo "I:exit status: $status"