tests.sh revision 66e50468dde42a9757ac489e738d8b2db8fd7f80
#
# Copyright (C) 2006, 2007 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.
# $Id: tests.sh,v 1.6 2008/04/24 21:50:27 each Exp $
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
fi
#
#
#
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)"
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 ..; sh 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 ..; sh 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 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)"
ret=0
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:exit status: $status"
exit $status