Commit 49740fb0 authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] add I: when echoing information about failed tests

parent f665c724
......@@ -15,20 +15,20 @@ status=0
for bad in bad-*.conf
do
ret=0
echo "I: checking that named-checkconf detects error in $bad"
$CHECKCONF $bad > /dev/null 2>&1
if [ $? != 1 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
ret=0
echo "I: checking that named-checkconf detects error in $bad"
$CHECKCONF $bad > /dev/null 2>&1
if [ $? != 1 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
done
for good in good-*.conf
do
ret=0
echo "I: checking that named-checkconf detects no error in $good"
$CHECKCONF $good > /dev/null 2>&1
if [ $? != 0 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
ret=0
echo "I: checking that named-checkconf detects no error in $good"
$CHECKCONF $good > /dev/null 2>&1
if [ $? != 0 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
done
$DIG +short @10.53.0.3 -p 5300 a.example > dig.out
......@@ -94,13 +94,16 @@ rr3=`$DNSTAPREAD ns3/dnstap.out.save | grep "RR " | wc -l`
echo "I: checking UDP message counts"
ret=0
[ $udp1 -eq 0 ] || {
echo "ns1 $udp1 expected 0" ; ret=1
echo "I:ns1 $udp1 expected 0"
ret=1
}
[ $udp2 -eq 2 ] || {
echo "ns2 $udp2 expected 2" ; ret=1
echo "I:ns2 $udp2 expected 2"
ret=1
}
[ $udp3 -eq 4 ] || {
echo "ns3 $udp3 expected 4" ; ret=1
echo "I:ns3 $udp3 expected 4"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -108,13 +111,16 @@ status=`expr $status + $ret`
echo "I: checking TCP message counts"
ret=0
[ $tcp1 -eq 6 ] || {
echo "ns1 $tcp1 expected 6" ; ret=1
echo "I:ns1 $tcp1 expected 6"
ret=1
}
[ $tcp2 -eq 2 ] || {
echo "ns2 $tcp2 expected 2" ; ret=1
echo "I:ns2 $tcp2 expected 2"
ret=1
}
[ $tcp3 -eq 6 ] || {
echo "ns3 $tcp3 expected 6" ; ret=1
echo "I:ns3 $tcp3 expected 6"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -122,13 +128,16 @@ status=`expr $status + $ret`
echo "I: checking AUTH_QUERY message counts"
ret=0
[ $aq1 -eq 2 ] || {
echo "ns1 $aq1 exepcted 2" ; ret=1
echo "I:ns1 $aq1 exepcted 2"
ret=1
}
[ $aq2 -eq 1 ] || {
echo "ns2 $aq2 expected 1" ; ret=1
echo "I:ns2 $aq2 expected 1"
ret=1
}
[ $aq3 -eq 0 ] || {
echo "ns3 $aq3 expected 0" ; ret=1
echo "I:ns3 $aq3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -136,13 +145,16 @@ status=`expr $status + $ret`
echo "I: checking AUTH_RESPONSE message counts"
ret=0
[ $ar1 -eq 2 ] || {
echo "ns1 $ar1 expected 2" ; ret=1
echo "I:ns1 $ar1 expected 2"
ret=1
}
[ $ar2 -eq 1 ] || {
echo "ns2 $ar2 expected 1" ; ret=1
echo "I:ns2 $ar2 expected 1"
ret=1
}
[ $ar3 -eq 0 ] || {
echo "ns3 $ar3 expected 0" ; ret=1
echo "I:ns3 $ar3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -150,13 +162,16 @@ status=`expr $status + $ret`
echo "I: checking CLIENT_QUERY message counts"
ret=0
[ $cq1 -eq 1 ] || {
echo "ns1 $cq1 expected 1" ; ret=1
echo "I:ns1 $cq1 expected 1"
ret=1
}
[ $cq2 -eq 1 ] || {
echo "ns2 $cq2 expected 1" ; ret=1
echo "I:ns2 $cq2 expected 1"
ret=1
}
[ $cq3 -eq 2 ] || {
echo "ns3 $cq3 expected 2" ; ret=1
echo "I:ns3 $cq3 expected 2"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -164,13 +179,16 @@ status=`expr $status + $ret`
echo "I: checking CLIENT_RESPONSE message counts"
ret=0
[ $cr1 -eq 1 ] || {
echo "ns1 $cr1 expected 1" ; ret=1
echo "I:ns1 $cr1 expected 1"
ret=1
}
[ $cr2 -eq 1 ] || {
echo "ns2 $cr2 expected 1" ; ret=1
echo "I:ns2 $cr2 expected 1"
ret=1
}
[ $cr3 -eq 2 ] || {
echo "ns3 $cr3 expected 2" ; ret=1
echo "I:ns3 $cr3 expected 2"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -178,13 +196,16 @@ status=`expr $status + $ret`
echo "I: checking RESOLVER_QUERY message counts"
ret=0
[ $rq1 -eq 0 ] || {
echo "ns1 $rq1 expected 0" ; ret=1
echo "I:ns1 $rq1 expected 0"
ret=1
}
[ $rq2 -eq 0 ] || {
echo "ns2 $rq2 expected 0" ; ret=1
echo "I:ns2 $rq2 expected 0"
ret=1
}
[ $rq3 -eq 3 ] || {
echo "ns3 $rq3 expected 3" ; ret=1
echo "I:ns3 $rq3 expected 3"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -192,13 +213,16 @@ status=`expr $status + $ret`
echo "I: checking RESOLVER_RESPONSE message counts"
ret=0
[ $rr1 -eq 0 ] || {
echo "ns1 $rr1 expected 0" ; ret=1
echo "I:ns1 $rr1 expected 0"
ret=1
}
[ $rr2 -eq 0 ] || {
echo "ns2 $rr2 expected 0" ; ret=1
echo "I:ns2 $rr2 expected 0"
ret=1
}
[ $rr3 -eq 3 ] || {
echo "ns3 $rr3 expected 3" ; ret=1
echo "I:ns3 $rr3 expected 3"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -235,13 +259,16 @@ rr3=`$DNSTAPREAD ns3/dnstap.out | grep "RR " | wc -l`
echo "I: checking UDP message counts"
ret=0
[ $udp1 -eq 0 ] || {
echo "ns1 $udp1 expected 0" ; ret=1
echo "I:ns1 $udp1 expected 0"
ret=1
}
[ $udp2 -eq 0 ] || {
echo "ns2 $udp2 expected 0" ; ret=1
echo "I:ns2 $udp2 expected 0"
ret=1
}
[ $udp3 -eq 2 ] || {
echo "ns3 $udp3 expected 2" ; ret=1
echo "I:ns3 $udp3 expected 2"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -249,13 +276,16 @@ status=`expr $status + $ret`
echo "I: checking TCP message counts"
ret=0
[ $tcp1 -eq 0 ] || {
echo "ns1 $tcp1 expected 0" ; ret=1
echo "I:ns1 $tcp1 expected 0"
ret=1
}
[ $tcp2 -eq 0 ] || {
echo "ns2 $tcp2 expected 0" ; ret=1
echo "I:ns2 $tcp2 expected 0"
ret=1
}
[ $tcp3 -eq 0 ] || {
echo "ns3 $tcp3 expected 0" ; ret=1
echo "I:ns3 $tcp3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -263,13 +293,16 @@ status=`expr $status + $ret`
echo "I: checking AUTH_QUERY message counts"
ret=0
[ $aq1 -eq 0 ] || {
echo "ns1 $aq1 exepcted 0" ; ret=1
echo "I:ns1 $aq1 exepcted 0"
ret=1
}
[ $aq2 -eq 0 ] || {
echo "ns2 $aq2 expected 0" ; ret=1
echo "I:ns2 $aq2 expected 0"
ret=1
}
[ $aq3 -eq 0 ] || {
echo "ns3 $aq3 expected 0" ; ret=1
echo "I:ns3 $aq3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -277,13 +310,16 @@ status=`expr $status + $ret`
echo "I: checking AUTH_RESPONSE message counts"
ret=0
[ $ar1 -eq 0 ] || {
echo "ns1 $ar1 expected 0" ; ret=1
echo "I:ns1 $ar1 expected 0"
ret=1
}
[ $ar2 -eq 0 ] || {
echo "ns2 $ar2 expected 0" ; ret=1
echo "I:ns2 $ar2 expected 0"
ret=1
}
[ $ar3 -eq 0 ] || {
echo "ns3 $ar3 expected 0" ; ret=1
echo "I:ns3 $ar3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -291,13 +327,16 @@ status=`expr $status + $ret`
echo "I: checking CLIENT_QUERY message counts"
ret=0
[ $cq1 -eq 0 ] || {
echo "ns1 $cq1 expected 0" ; ret=1
echo "I:ns1 $cq1 expected 0"
ret=1
}
[ $cq2 -eq 0 ] || {
echo "ns2 $cq2 expected 0" ; ret=1
echo "I:ns2 $cq2 expected 0"
ret=1
}
[ $cq3 -eq 1 ] || {
echo "ns3 $cq3 expected 1" ; ret=1
echo "I:ns3 $cq3 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -305,13 +344,16 @@ status=`expr $status + $ret`
echo "I: checking CLIENT_RESPONSE message counts"
ret=0
[ $cr1 -eq 0 ] || {
echo "ns1 $cr1 expected 0" ; ret=1
echo "I:ns1 $cr1 expected 0"
ret=1
}
[ $cr2 -eq 0 ] || {
echo "ns2 $cr2 expected 0" ; ret=1
echo "I:ns2 $cr2 expected 0"
ret=1
}
[ $cr3 -eq 1 ] || {
echo "ns3 $cr3 expected 1" ; ret=1
echo "I:ns3 $cr3 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -319,13 +361,16 @@ status=`expr $status + $ret`
echo "I: checking RESOLVER_QUERY message counts"
ret=0
[ $rq1 -eq 0 ] || {
echo "ns1 $rq1 expected 0" ; ret=1
echo "I:ns1 $rq1 expected 0"
ret=1
}
[ $rq2 -eq 0 ] || {
echo "ns2 $rq2 expected 0" ; ret=1
echo "I:ns2 $rq2 expected 0"
ret=1
}
[ $rq3 -eq 0 ] || {
echo "ns3 $rq3 expected 0" ; ret=1
echo "I:ns3 $rq3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -333,13 +378,16 @@ status=`expr $status + $ret`
echo "I: checking RESOLVER_RESPONSE message counts"
ret=0
[ $rr1 -eq 0 ] || {
echo "ns1 $rr1 expected 0" ; ret=1
echo "I:ns1 $rr1 expected 0"
ret=1
}
[ $rr2 -eq 0 ] || {
echo "ns2 $rr2 expected 0" ; ret=1
echo "I:ns2 $rr2 expected 0"
ret=1
}
[ $rr3 -eq 0 ] || {
echo "ns3 $rr3 expected 0" ; ret=1
echo "I:ns3 $rr3 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -385,7 +433,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking UDP message counts"
ret=0
[ $udp4 -eq 2 ] || {
echo "ns4 $udp4 expected 2" ; ret=1
echo "I:ns4 $udp4 expected 2"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -393,7 +442,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking TCP message counts"
ret=0
[ $tcp4 -eq 0 ] || {
echo "ns4 $tcp4 expected 0" ; ret=1
echo "I:ns4 $tcp4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -401,7 +451,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking AUTH_QUERY message counts"
ret=0
[ $aq4 -eq 0 ] || {
echo "ns4 $aq4 expected 0" ; ret=1
echo "I:ns4 $aq4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -409,7 +460,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking AUTH_RESPONSE message counts"
ret=0
[ $ar4 -eq 0 ] || {
echo "ns4 $ar4 expected 0" ; ret=1
echo "I:ns4 $ar4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -417,7 +469,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking CLIENT_QUERY message counts"
ret=0
[ $cq4 -eq 1 ] || {
echo "ns4 $cq4 expected 1" ; ret=1
echo "I:ns4 $cq4 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -425,7 +478,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking CLIENT_RESPONSE message counts"
ret=0
[ $cr4 -eq 1 ] || {
echo "ns4 $cr4 expected 1" ; ret=1
echo "I:ns4 $cr4 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -433,7 +487,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking RESOLVER_QUERY message counts"
ret=0
[ $rq4 -eq 0 ] || {
echo "ns4 $rq4 expected 0" ; ret=1
echo "I:ns4 $rq4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -441,7 +496,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking RESOLVER_RESPONSE message counts"
ret=0
[ $rr4 -eq 0 ] || {
echo "ns4 $rr4 expected 0" ; ret=1
echo "I:ns4 $rr4 expected 0"
ret=1
}
mv dnstap.out dnstap.out.save
$FSTRM_CAPTURE -t protobuf:dnstap.Dnstap -u ns4/dnstap.out \
......@@ -466,7 +522,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking UDP message counts"
ret=0
[ $udp4 -eq 2 ] || {
echo "ns4 $udp4 expected 2" ; ret=1
echo "I:ns4 $udp4 expected 2"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -474,7 +531,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking TCP message counts"
ret=0
[ $tcp4 -eq 0 ] || {
echo "ns4 $tcp4 expected 0" ; ret=1
echo "I:ns4 $tcp4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -482,7 +540,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking AUTH_QUERY message counts"
ret=0
[ $aq4 -eq 0 ] || {
echo "ns4 $aq4 expected 0" ; ret=1
echo "I:ns4 $aq4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -490,7 +549,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking AUTH_RESPONSE message counts"
ret=0
[ $ar4 -eq 0 ] || {
echo "ns4 $ar4 expected 0" ; ret=1
echo "I:ns4 $ar4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -498,7 +558,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking CLIENT_QUERY message counts"
ret=0
[ $cq4 -eq 1 ] || {
echo "ns4 $cq4 expected 1" ; ret=1
echo "I:ns4 $cq4 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -506,7 +567,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking CLIENT_RESPONSE message counts"
ret=0
[ $cr4 -eq 1 ] || {
echo "ns4 $cr4 expected 1" ; ret=1
echo "I:ns4 $cr4 expected 1"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -514,7 +576,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking RESOLVER_QUERY message counts"
ret=0
[ $rq4 -eq 0 ] || {
echo "ns4 $rq4 expected 0" ; ret=1
echo "I:ns4 $rq4 expected 0"
ret=1
}
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
......@@ -522,7 +585,8 @@ if [ -n "$FSTRM_CAPTURE" ] ; then
echo "I: checking RESOLVER_RESPONSE message counts"
ret=0
[ $rr4 -eq 0 ] || {
echo "ns4 $rr4 expected 0" ; ret=1
echo "I:ns4 $rr4 expected 0"
ret=1
}
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment