|
|
|
@@ -142,6 +142,21 @@ if [ $match -lt `expr ${GOOD_RANDOM_NO} / 3` ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Checking order none (primary)"
|
|
|
|
|
ret=0
|
|
|
|
|
# Fetch the "reference" response and ensure it contains the expected records.
|
|
|
|
|
$DIGCMD @10.53.0.1 none.example > dig.out.none || ret=1
|
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
|
grep -F -q 1.2.3.$i dig.out.none || ret=1
|
|
|
|
|
done
|
|
|
|
|
# Ensure 20 further queries result in the same response as the "reference" one.
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|
|
|
|
$DIGCMD @10.53.0.1 none.example > dig.out.test$i || ret=1
|
|
|
|
|
$DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
@@ -236,6 +251,21 @@ if [ $match -lt `expr ${GOOD_RANDOM_NO} / 3` ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Checking order none (secondary)"
|
|
|
|
|
ret=0
|
|
|
|
|
# Fetch the "reference" response and ensure it contains the expected records.
|
|
|
|
|
$DIGCMD @10.53.0.2 none.example > dig.out.none || ret=1
|
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
|
grep -F -q 1.2.3.$i dig.out.none || ret=1
|
|
|
|
|
done
|
|
|
|
|
# Ensure 20 further queries result in the same response as the "reference" one.
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|
|
|
|
$DIGCMD @10.53.0.2 none.example > dig.out.test$i || ret=1
|
|
|
|
|
$DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Shutting down secondary"
|
|
|
|
|
|
|
|
|
|
(cd ..; $SHELL stop.sh rrsetorder ns2 )
|
|
|
|
@@ -346,6 +376,21 @@ if [ $match -lt `expr ${GOOD_RANDOM_NO} / 3` ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Checking order none (secondary loaded from disk)"
|
|
|
|
|
ret=0
|
|
|
|
|
# Fetch the "reference" response and ensure it contains the expected records.
|
|
|
|
|
$DIGCMD @10.53.0.2 none.example > dig.out.none || ret=1
|
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
|
grep -F -q 1.2.3.$i dig.out.none || ret=1
|
|
|
|
|
done
|
|
|
|
|
# Ensure 20 further queries result in the same response as the "reference" one.
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|
|
|
|
$DIGCMD @10.53.0.2 none.example > dig.out.test$i || ret=1
|
|
|
|
|
$DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
@@ -443,6 +488,21 @@ echo_i "Random selection return $match of ${GOOD_RANDOM_NO} possible orders in 3
|
|
|
|
|
if [ $match -lt `expr ${GOOD_RANDOM_NO} / 3` ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
|
|
|
|
|
echo_i "Checking order none (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
# Fetch the "reference" response and ensure it contains the expected records.
|
|
|
|
|
$DIGCMD @10.53.0.3 none.example > dig.out.none || ret=1
|
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
|
grep -F -q 1.2.3.$i dig.out.none || ret=1
|
|
|
|
|
done
|
|
|
|
|
# Ensure 20 further queries result in the same response as the "reference" one.
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|
|
|
|
$DIGCMD @10.53.0.3 none.example > dig.out.test$i || ret=1
|
|
|
|
|
$DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Checking default order (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in $GOOD_RANDOM
|
|
|
|
@@ -468,33 +528,22 @@ done
|
|
|
|
|
echo_i "Default selection return $match of ${GOOD_RANDOM_NO} possible orders in 36 samples"
|
|
|
|
|
if [ $match -lt `expr ${GOOD_RANDOM_NO} / 3` ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
|
|
|
|
|
echo_i "Checking default order no match in rrset-order (no shuffling)"
|
|
|
|
|
ret=0
|
|
|
|
|
for i in $GOOD_RANDOM
|
|
|
|
|
do
|
|
|
|
|
eval match$i=0
|
|
|
|
|
done
|
|
|
|
|
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 9
|
|
|
|
|
do
|
|
|
|
|
$DIGCMD @10.53.0.4 nomatch.example > dig.out.nomatch|| ret=1
|
|
|
|
|
match=0
|
|
|
|
|
for j in $GOOD_RANDOM
|
|
|
|
|
do
|
|
|
|
|
eval "$DIFF dig.out.nomatch dig.out.random.good$j >/dev/null && match$j=1 match=1"
|
|
|
|
|
if [ $match -eq 1 ]; then break; fi
|
|
|
|
|
done
|
|
|
|
|
if [ $match -eq 0 ]; then ret=1; fi
|
|
|
|
|
done
|
|
|
|
|
match=0
|
|
|
|
|
for i in $GOOD_RANDOM
|
|
|
|
|
do
|
|
|
|
|
eval "match=\`expr \$match + \$match$i\`"
|
|
|
|
|
done
|
|
|
|
|
echo_i "Consistent selection return $match of ${GOOD_RANDOM_NO} possible orders in 36 samples"
|
|
|
|
|
if [ $match -ne 1 ]; then ret=1; fi
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "Checking default order no match in rrset-order (cache)"
|
|
|
|
|
ret=0
|
|
|
|
|
# Fetch the "reference" response and ensure it contains the expected records.
|
|
|
|
|
$DIGCMD @10.53.0.4 nomatch.example > dig.out.nomatch || ret=1
|
|
|
|
|
for i in 1 2 3 4; do
|
|
|
|
|
grep -F -q 1.2.3.$i dig.out.nomatch || ret=1
|
|
|
|
|
done
|
|
|
|
|
# Ensure 20 further queries result in the same response as the "reference" one.
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|
|
|
|
$DIGCMD @10.53.0.4 nomatch.example > dig.out.test$i || ret=1
|
|
|
|
|
$DIFF dig.out.nomatch dig.out.test$i >/dev/null || ret=1
|
|
|
|
|
done
|
|
|
|
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
|
|
|
|
status=`expr $status + $ret`
|
|
|
|
|
|
|
|
|
|
echo_i "exit status: $status"
|
|
|
|
|
[ $status -eq 0 ] || exit 1
|
|
|
|
|