[rt41269] additional tests for dig and delv,

fix for --disable-ipv6 on osx,
              fixes for tests with --disable-ipv6
This commit is contained in:
Curtis Blackburn
2015-12-15 11:58:28 -08:00
parent 6960e7fd12
commit 9effea437d
6 changed files with 162 additions and 25 deletions

View File

@@ -31,7 +31,12 @@ $DIG $DIGOPTS @10.53.0.3 indirect1.example.org > dig.out.1.test$n || ret=1
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -eq 26 ] || ret=1
if $TESTSOCK6 != false
then
[ $count -eq 26 ] || { ret=1; echo "I: count ($count) != 26"; }
else
[ $count -eq 14 ] || { ret=1; echo "I: count ($count) != 14"; }
fi
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -45,7 +50,12 @@ $DIG $DIGOPTS @10.53.0.3 indirect2.example.org > dig.out.1.test$n || ret=1
grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -eq 49 ] || ret=1
if $TESTSOCK6 != false
then
[ $count -eq 49 ] || { ret=1; echo "I: count ($count) != 49"; }
else
[ $count -eq 26 ] || { ret=1; echo "I: count ($count) != 26"; }
fi
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -64,7 +74,12 @@ $DIG $DIGOPTS @10.53.0.3 indirect3.example.org > dig.out.1.test$n || ret=1
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -eq 12 ] || ret=1
if $TESTSOCK6 != false
then
[ $count -eq 12 ] || { ret=1; echo "I: count ($count) != 12"; }
else
[ $count -eq 7 ] || { ret=1; echo "I: count ($count) != 7"; }
fi
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -78,7 +93,12 @@ $DIG $DIGOPTS @10.53.0.3 indirect4.example.org > dig.out.1.test$n || ret=1
grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -eq 21 ] || ret=1
if $TESTSOCK6 != false
then
[ $count -eq 21 ] || { ret=1; echo "I: count ($count) != 21"; }
else
[ $count -eq 12 ] || { ret=1; echo "I: count ($count) != 12"; }
fi
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -94,10 +114,13 @@ echo "13" > ans2/ans.limit
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /'
$DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
$DIG $DIGOPTS @10.53.0.3 indirect5.example.org > dig.out.1.test$n || ret=1
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
if $TESTSOCK6 != false
then
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
fi
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -le 50 ] || ret=1
[ $count -le 50 ] || { ret=1; echo "I: count ($count) !<= 50"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -111,7 +134,7 @@ $DIG $DIGOPTS @10.53.0.3 indirect6.example.org > dig.out.1.test$n || ret=1
grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -le 50 ] || ret=1
[ $count -le 50 ] || { ret=1; echo "I: count ($count) !<= 50"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -127,10 +150,13 @@ echo "10" > ans2/ans.limit
$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush 2>&1 | sed 's/^/I:ns1 /'
$DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
$DIG $DIGOPTS @10.53.0.3 indirect7.example.org > dig.out.1.test$n || ret=1
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
if $TESTSOCK6 != false
then
grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
fi
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -le 40 ] || ret=1
[ $count -le 40 ] || { ret=1; echo "I: count ($count) !<= 40"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -144,7 +170,7 @@ $DIG $DIGOPTS @10.53.0.3 indirect8.example.org > dig.out.1.test$n || ret=1
grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
eval count=`cat dig.out.2.test$n`
[ $count -le 40 ] || ret=1
[ $count -le 40 ] || { ret=1; echo "I: count ($count) !<= 40"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -159,7 +185,7 @@ eval count=`cat dig.out.2.test$n`
[ $count -lt 50 ] || ret=1
$DIG $DIGOPTS +short @10.53.0.7 count txt > dig.out.3.test$n || ret=1
eval count=`cat dig.out.3.test$n`
[ $count -lt 50 ] || ret=1
[ $count -lt 50 ] || { ret=1; echo "I: count ($count) !<= 50"; }
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`