tests.sh revision 9b956d342e93ab60d5d9367785b26546f7e49391
#
# Copyright (C) 2006-2008, 2011, 2012, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
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 "cmp -s dig.out.random dig.out.random.good$j && 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 "cmp -s dig.out.random dig.out.random.good$j && 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 "cmp -s dig.out.random dig.out.random.good$j && 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 "cmp -s dig.out.random dig.out.random.good$j && 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 "cmp -s dig.out.random dig.out.random.good$j && 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"
exit $status