]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure use of "echo_i" where possible
authorMichal Nowak <mnowak@isc.org>
Thu, 15 Oct 2020 14:27:30 +0000 (16:27 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 22 Oct 2020 10:16:24 +0000 (12:16 +0200)
In many instances 'echo "I:' construct was used where echo_i function
should have been.

28 files changed:
bin/tests/system/delzone/tests.sh
bin/tests/system/dialup/tests.sh
bin/tests/system/digdelv/prereq.sh
bin/tests/system/ecdsa/tests.sh
bin/tests/system/eddsa/tests.sh
bin/tests/system/fetchlimit/prereq.sh
bin/tests/system/filter-aaaa/prereq.sh
bin/tests/system/gost/tests.sh
bin/tests/system/inline/ns3/sign.sh
bin/tests/system/lwresd/tests.sh
bin/tests/system/mkeys/tests.sh
bin/tests/system/pkcs11/setup.sh
bin/tests/system/pkcs11/tests.sh
bin/tests/system/pkcs11ssl/prereq.sh
bin/tests/system/pkcs11ssl/tests.sh
bin/tests/system/resolver/tests.sh
bin/tests/system/rpzrecurse/prereq.sh
bin/tests/system/sfcache/prereq.sh
bin/tests/system/stress/prereq.sh
bin/tests/system/stress/tests.sh
bin/tests/system/testcrypto.sh
bin/tests/system/tkey/tests.sh
bin/tests/system/tsig/prereq.sh
bin/tests/system/tsig/tests.sh
bin/tests/system/tsiggss/tests.sh
bin/tests/system/unknown/tests.sh
bin/tests/system/views/tests.sh
bin/tests/system/zero/prereq.sh

index e1d41bdb22a86aef1bd831ebb8e499d7e4403852..6810f90608f0ca0d0ef1e33c1ea2b7d42a1676b7 100755 (executable)
@@ -16,20 +16,20 @@ DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnss
 status=0
 n=0
 
-echo "I:checking normally loaded zone ($n)"
+echo_i "checking normally loaded zone ($n)"
 ret=0
 $DIG $DIGOPTS @10.53.0.2 a.normal.example a > dig.out.ns2.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.normal.example' dig.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x "$PYTHON" ]; then 
-echo "I:adding and deleting 20000 new zones ($n)"
+echo_i "adding and deleting 20000 new zones ($n)"
 ret=0
     time (
-        echo "I:adding"
+        echo_i "adding"
         $PYTHON << EOF
 import sys
 sys.path.insert(0, '../../../../bin/python')
@@ -42,7 +42,7 @@ for i in range(20000):
 EOF
     )
     time (
-        echo "I:deleting"
+        echo_i "deleting"
         $PYTHON << EOF
 import sys
 sys.path.insert(0, '../../../../bin/python')
@@ -55,9 +55,9 @@ for i in range(20000):
 EOF
     )
     n=`expr $n + 1`
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 exit $status
index 962a03aad8fdcbe4d52efe07b9416f2cad7a17f4..64e8fd0c9997968662ab897d033a356a6082c958 100644 (file)
@@ -21,7 +21,7 @@ DIGOPTS="+norec +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300"
 # Check the example. domain
 
 $DIG $DIGOPTS example. @10.53.0.1 soa > dig.out.ns1.test || ret=1
-echo "I:checking that first zone transfer worked"
+echo_i "checking that first zone transfer worked"
 ret=0
 try=0
 while test $try -lt 120
@@ -36,11 +36,11 @@ do
                break;
        fi
 done
-echo "I:try $try"
-if [ $ret != 0 ]; then echo "I:failed"; fi
+echo_i "try $try"
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that second zone transfer worked"
+echo_i "checking that second zone transfer worked"
 ret=0
 try=0
 while test $try -lt 120
@@ -55,9 +55,9 @@ do
                break;
        fi
 done
-echo "I:try $try"
-if [ $ret != 0 ]; then echo "I:failed"; fi
+echo_i "try $try"
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index fa665361dabfa1b805aa9a3116cff6ca6b14bbbd..d2ca8fc2bf509a7ee780d5a51ad383a048f1d0f3 100644 (file)
@@ -16,6 +16,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index aee86c5674068cb140c93fca35ceedd27f779031..8f8c6974a2462949519b117b1bd49fab42d9d7d6 100644 (file)
@@ -20,16 +20,15 @@ rm -f dig.out.*
 DIGOPTS="+tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p 5300"
 
 # Check the example. domain
-
-echo "I:checking that positive validation works ($n)"
+echo_i "checking that positive validation works ($n)"
 ret=0
 $DIG $DIGOPTS . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS . @10.53.0.2 soa > dig.out.ns2.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null || ret=1
-n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
-status=`expr $status + $ret`
+n=$((n+1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 5ca4d4c5205a8c52a33248dfb2844349fe72e9c1..8efb030da5010130d217f70d5234a40fab8be7ed 100644 (file)
@@ -21,29 +21,29 @@ DIGOPTS="+tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p 5300"
 
 # Check the example. domain
 
-echo "I:checking that positive validation works ($n)"
+echo_i "checking that positive validation works ($n)"
 ret=0
 $DIG $DIGOPTS . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS . @10.53.0.2 soa > dig.out.ns2.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null || ret=1
-n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
-status=`expr $status + $ret`
+n=$((n+1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
 
 # Check test vectors (RFC 8080 + errata)
 
-echo "I:checking that Ed25519 test vectors match ($n)"
+echo_i "checking that Ed25519 test vectors match ($n)"
 ret=0
 grep 'oL9krJun7xfBOIWcGHi7mag5/hdZrKWw15jP' ns2/example.com.db.signed > /dev/null || ret=1
 grep 'VrbpMngwcrqNAg==' ns2/example.com.db.signed > /dev/null || ret=1
 grep 'zXQ0bkYgQTEFyfLyi9QoiY6D8ZdYo4wyUhVi' ns2/example.com.db.signed > /dev/null || ret=1
 grep 'R0O7KuI5k2pcBg==' ns2/example.com.db.signed > /dev/null || ret=1
-n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
-status=`expr $status + $ret`
+n=$((n+1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
 
-echo "I:checking that Ed448 test vectors match ($n)"
+echo_i "checking that Ed448 test vectors match ($n)"
 ret=0
 grep '3cPAHkmlnxcDHMyg7vFC34l0blBhuG1qpwLm' ns2/example.com.db.signed > /dev/null || ret=1
 grep 'jInI8w1CMB29FkEAIJUA0amxWndkmnBZ6SKi' ns2/example.com.db.signed > /dev/null || ret=1
@@ -57,9 +57,9 @@ grep '4m0AsQ4f7qI1gVnML8vWWiyW2KXhT9kuAICU' ns2/example.com.db.signed > /dev/nul
 grep 'Sxv5OWbf81Rq7Yu60npabODB0QFPb/rkW3kU' ns2/example.com.db.signed > /dev/null || ret=1
 grep 'ZmQ0YQUA' ns2/example.com.db.signed > /dev/null || ret=1
 
-n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
-status=`expr $status + $ret`
+n=$((n+1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index fa665361dabfa1b805aa9a3116cff6ca6b14bbbd..d2ca8fc2bf509a7ee780d5a51ad383a048f1d0f3 100644 (file)
@@ -16,6 +16,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index c59111d9bc1bd31c924195858ed6e8ccf620750a..59ba6bcec492107fb94c7dd6f45e8e499f0ce79b 100644 (file)
@@ -13,7 +13,7 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 $FEATURETEST --enable-filter-aaaa || {
-    echo "I:This test requires --enable-filter-aaaa at compile time." >&2
+    echo_i "This test requires --enable-filter-aaaa at compile time." >&2
     exit 255
 }
 exit 0
index 1b329c31a657fad8bbcbce4364605d7d1b96cf40..fdb9a1db257edfa4d8b981c8af9f86826643d926 100644 (file)
@@ -21,15 +21,15 @@ DIGOPTS="+tcp +noadd +noauth +nosea +nostat +nocmd +dnssec -p 5300"
 
 # Check the example. domain
 
-echo "I:checking that positive validation works ($n)"
+echo_i "checking that positive validation works ($n)"
 ret=0
 $DIG $DIGOPTS . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS . @10.53.0.2 soa > dig.out.ns2.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index e4e499c39540609e2baad601d5b24c195537e786..9a414acbeb7ac94e03c8377f8f81e48d9f8aead2 100755 (executable)
@@ -173,9 +173,9 @@ do
     rm -f $k1.private 
     mv $k1.key a-file
     $IMPORTKEY -P now -D now+3600 -f a-file $zone > /dev/null 2>&1 ||
-        ( echo "importkey failed: $alg"; rm -f $checkfile )
+        ( echo_i "importkey failed: $alg"; rm -f $checkfile )
     rm -f $k2.private 
     mv $k2.key a-file
     $IMPORTKEY -f a-file $zone > /dev/null 2>&1 ||
-        ( echo "importkey failed: $alg"; rm -f $checkfile )
+        ( echo_i "importkey failed: $alg"; rm -f $checkfile )
 done
index 0e6c093bfcfebf19dc9bac5e737dd11e4a139e3a..e26fdf0b98aa922acde4a4b9312582e9af737dca 100644 (file)
@@ -15,7 +15,7 @@ SYSTEMTESTTOP=..
 common_options="-D lwresd-lwresd1 -X lwresd.lock -m record,size,mctx -T clienttest -d 99 -g -U 4 -i lwresd.pid -P 9210 -p 5300"
 
 status=0
-echo "I:waiting for nameserver to load"
+echo_i "waiting for nameserver to load"
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        ret=0
@@ -29,10 +29,10 @@ do
        test $ret = 0 && break
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:using resolv.conf"
+echo_i "using resolv.conf"
 ret=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
@@ -41,7 +41,7 @@ do
 done
 $LWTEST || ret=1
 if [ $ret != 0 ]; then
-       echo "I:failed"
+       echo_i "failed"
 fi
 status=`expr $status + $ret`
 
@@ -51,7 +51,7 @@ mv lwresd1/lwresd.run lwresd1/lwresd.run.resolv
 
 $PERL $SYSTEMTESTTOP/start.pl --restart lwresd lwresd1 -- "-c lwresd.conf $common_options"
 
-echo "I:using lwresd.conf"
+echo_i "using lwresd.conf"
 ret=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
@@ -60,7 +60,7 @@ do
 done
 $LWTEST || ret=1
 if [ $ret != 0 ]; then
-       echo "I:failed"
+       echo_i "failed"
 fi
 status=`expr $status + $ret`
 
@@ -70,7 +70,7 @@ mv lwresd1/lwresd.run lwresd1/lwresd.run.lwresd
 
 $PERL $SYSTEMTESTTOP/start.pl --restart lwresd lwresd1 -- "-c nosearch.conf $common_options"
 
-echo "I:using nosearch.conf"
+echo_i "using nosearch.conf"
 ret=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
@@ -79,9 +79,9 @@ do
 done
 $LWTEST -nosearch || ret=1
 if [ $ret != 0 ]; then
-       echo "I:failed"
+       echo_i "failed"
 fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 748ee5e3cc6d123d93f50f95c050a199ec55b368..0e7a96e238ba9abcd0d649e51ed1dd996a592e1e 100644 (file)
@@ -371,27 +371,27 @@ mkeys_loadkeys_on 1 || ret=1
 mkeys_refresh_on 2 || ret=1
 mkeys_status_on 2 > rndc.out.1.$n 2>&1 || ret=1
 # four keys listed
-count=`grep -c "keyid: " rndc.out.1.$n`
-[ "$count" -eq 4 ] || { echo "keyid: count ($count) != 4"; ret=1; }
+count=$(grep -c "keyid: " rndc.out.1.$n) || true
+[ "$count" -eq 4 ] || { echo_i "keyid: count ($count) != 4"; ret=1; }
 # one revoked
-count=`grep -c "trust revoked" rndc.out.1.$n`
-[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
+count=$(grep -c "trust revoked" rndc.out.1.$n) || true
+[ "$count" -eq 1 ] || { echo_i "trust revoked count ($count) != 1"; ret=1; }
 # two pending
-count=`grep -c "trust pending" rndc.out.1.$n`
-[ "$count" -eq 2 ] || { echo "trust pending count ($count) != 2"; ret=1; }
+count=$(grep -c "trust pending" rndc.out.1.$n) || true
+[ "$count" -eq 2 ] || { echo_i "trust pending count ($count) != 2"; ret=1; }
 $SETTIME -R now -K ns1 "$standby3" > /dev/null
 mkeys_loadkeys_on 1 || ret=1
 mkeys_refresh_on 2 || ret=1
 mkeys_status_on 2 > rndc.out.2.$n 2>&1 || ret=1
 # now three keys listed
-count=`grep -c "keyid: " rndc.out.2.$n`
-[ "$count" -eq 3 ] || { echo "keyid: count ($count) != 3"; ret=1; }
+count=$(grep -c "keyid: " rndc.out.2.$n) || true
+[ "$count" -eq 3 ] || { echo_i "keyid: count ($count) != 3"; ret=1; }
 # one revoked
-count=`grep -c "trust revoked" rndc.out.2.$n`
-[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
+count=$(grep -c "trust revoked" rndc.out.2.$n) || true
+[ "$count" -eq 1 ] || { echo_i "trust revoked count ($count) != 1"; ret=1; }
 # one pending
-count=`grep -c "trust pending" rndc.out.2.$n`
-[ "$count" -eq 1 ] || { echo "trust pending count ($count) != 1"; ret=1; }
+count=$(grep -c "trust pending" rndc.out.2.$n) || true
+[ "$count" -eq 1 ] || { echo_i "trust pending count ($count) != 1"; ret=1; }
 $SETTIME -D now -K ns1 "$standby3" > /dev/null
 mkeys_loadkeys_on 1 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -506,19 +506,19 @@ mkeys_reload_on 1 || ret=1
 mkeys_refresh_on 2 || ret=1
 mkeys_status_on 2 > rndc.out.$n 2>&1 || ret=1
 # one key listed
-count=`grep -c "keyid: " rndc.out.$n`
-[ "$count" -eq 1 ] || { echo "'keyid:' count ($count) != 1"; ret=1; }
+count=$(grep -c "keyid: " rndc.out.$n) || true
+[ "$count" -eq 1 ] || { echo_i "'keyid:' count ($count) != 1"; ret=1; }
 # it's the original key id
-count=`grep -c "keyid: $originalid" rndc.out.$n`
-[ "$count" -eq 1 ] || { echo "'keyid: $originalid' count ($count) != 1"; ret=1; }
+count=$(grep -c "keyid: $originalid" rndc.out.$n) || true
+[ "$count" -eq 1 ] || { echo_i "'keyid: $originalid' count ($count) != 1"; ret=1; }
 # not revoked
-count=`grep -c "REVOKE" rndc.out.$n`
-[ "$count" -eq 0 ] || { echo "'REVOKE' count ($count) != 0"; ret=1; }
+count=$(grep -c "REVOKE" rndc.out.$n) || true
+[ "$count" -eq 0 ] || { echo_i "'REVOKE' count ($count) != 0"; ret=1; }
 # trust is still current
-count=`grep -c "trust" rndc.out.$n`
-[ "$count" -eq 1 ] || { echo "'trust' count != 1"; ret=1; }
-count=`grep -c "trusted since" rndc.out.$n`
-[ "$count" -eq 1 ] || { echo "'trusted since' count != 1"; ret=1; }
+count=$(grep -c "trust" rndc.out.$n) || true
+[ "$count" -eq 1 ] || { echo_i "'trust' count != 1"; ret=1; }
+count=$(grep -c "trusted since" rndc.out.$n) || true
+[ "$count" -eq 1 ] || { echo_i "'trusted since' count != 1"; ret=1; }
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
index 007dc028cd10dcf99340ec9de31dd142a96df1f3..09f618b816c8eef42acaeed18ef9a1d9f71c3272 100644 (file)
@@ -12,7 +12,7 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-echo "I:(Native PKCS#11)" >&2
+echo_i "(Native PKCS#11)" >&2
 ecxfail=0
 
 $SHELL ../testcrypto.sh -q eddsa || ecxfail=1
index 5360b18cc7283378ff9c62c76f4cf4e8cd886bb1..41d420d3cbb47747657e9fd4f350e4d07b3a4ed9 100644 (file)
@@ -33,19 +33,19 @@ fi
 
 for alg in $algs; do
     zonefile=ns1/$alg.example.db 
-    echo "I:testing PKCS#11 key generation ($alg)"
+    echo_i "testing PKCS#11 key generation ($alg)"
     count=`$PK11LIST | grep robie-$alg-ksk | wc -l`
-    if [ $count != 2 ]; then echo "I:failed"; status=1; fi
+    if [ $count != 2 ]; then echo_i "failed"; status=1; fi
 
-    echo "I:testing offline signing with PKCS#11 keys ($alg)"
+    echo_i "testing offline signing with PKCS#11 keys ($alg)"
 
     count=`grep RRSIG $zonefile.signed | wc -l`
-    if [ $count != 12 ]; then echo "I:failed"; status=1; fi
+    if [ $count != 12 ]; then echo_i "failed"; status=1; fi
 
-    echo "I:testing inline signing with PKCS#11 keys ($alg)"
+    echo_i "testing inline signing with PKCS#11 keys ($alg)"
 
     $DIG $DIGOPTS ns.$alg.example. @10.53.0.1 a > dig.out.$alg.0 || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
     count0=`grep RRSIG dig.out.$alg.0 | wc -l`
 
@@ -57,16 +57,16 @@ update add `grep -v ';' ns1/${alg}.key`
 send
 END
 
-    echo "I:waiting 20 seconds for key changes to take effect"
+    echo_i "waiting 20 seconds for key changes to take effect"
     sleep 20
 
     $DIG $DIGOPTS ns.$alg.example. @10.53.0.1 a > dig.out.$alg || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
     count=`grep RRSIG dig.out.$alg | wc -l`
-    if [ $count -le $count0 ]; then echo "I:failed"; status=1; fi
+    if [ $count -le $count0 ]; then echo_i "failed"; status=1; fi
 
-    echo "I:testing PKCS#11 key destroy ($alg)"
+    echo_i "testing PKCS#11 key destroy ($alg)"
     ret=0
     $PK11DEL -l robie-$alg-ksk -w0 > /dev/null 2>&1 || ret=1
     $PK11DEL -l robie-$alg-zsk1 -w0 > /dev/null 2>&1 || ret=1
@@ -76,10 +76,10 @@ END
        ecx) id=06 ;;
     esac
     $PK11DEL -i $id -w0 > /dev/null 2>&1 || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
     count=`$PK11LIST | grep robie-$alg | wc -l`
-    if [ $count != 0 ]; then echo "I:failed"; fi
+    if [ $count != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $count`
 done
 
index 122a2ba1609993c157dc5cb5622979a78b90e1d6..8796eca627f9160bca3ff1c3e071f3ccc5656c78 100644 (file)
@@ -12,5 +12,5 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-echo "I:(PKCS#11 via OpenSSL)" >&2
+echo_i "(PKCS#11 via OpenSSL)" >&2
 exec $SHELL ../testcrypto.sh rsa
index ace3731621593c2a900378fd1e2e9346fa11c691..ac344bedaeaaa0576c3091fc33e33d87bc80b811 100644 (file)
@@ -19,16 +19,16 @@ ret=0
 
 alg=rsa
 zonefile=ns1/rsa.example.db 
-echo "I:testing PKCS#11 key generation (rsa)"
+echo_i "testing PKCS#11 key generation (rsa)"
 count=`$PK11LIST | grep robie-rsa-ksk | wc -l`
-if [ $count != 2 ]; then echo "I:failed"; status=1; fi
+if [ $count != 2 ]; then echo_i "failed"; status=1; fi
 
-echo "I:testing offline signing with PKCS#11 keys (rsa)"
+echo_i "testing offline signing with PKCS#11 keys (rsa)"
 
 count=`grep RRSIG $zonefile.signed | wc -l`
-if [ $count != 12 ]; then echo "I:failed"; status=1; fi
+if [ $count != 12 ]; then echo_i "failed"; status=1; fi
 
-echo "I:testing inline signing with PKCS#11 keys (rsa)"
+echo_i "testing inline signing with PKCS#11 keys (rsa)"
 
 $NSUPDATE > /dev/null <<END || status=1
 server 10.53.0.1 5300
@@ -38,25 +38,25 @@ update add `grep -v ';' ns1/${alg}.key`
 send
 END
 
-echo "I:waiting 20 seconds for key changes to take effect"
+echo_i "waiting 20 seconds for key changes to take effect"
 sleep 20
 
 $DIG $DIGOPTS ns.rsa.example. @10.53.0.1 a > dig.out || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 count=`grep RRSIG dig.out | wc -l`
-if [ $count != 4 ]; then echo "I:failed"; status=1; fi
+if [ $count != 4 ]; then echo_i "failed"; status=1; fi
 
-echo "I:testing PKCS#11 key destroy (rsa)"
+echo_i "testing PKCS#11 key destroy (rsa)"
 ret=0
 $PK11DEL -l robie-rsa-ksk -w0 > /dev/null 2>&1 || ret=1
 $PK11DEL -l robie-rsa-zsk1 -w0 > /dev/null 2>&1 || ret=1
 $PK11DEL -i $id -w0 > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 count=`$PK11LIST | grep robie-rsa | wc -l`
-if [ $count != 0 ]; then echo "I:failed"; fi
+if [ $count != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $count`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f3177ce48c148bfaa4cf247b5d68474d727c5637..6eb52fe0f7023dfa7aac864acf32e80b60bf7560 100755 (executable)
@@ -11,7 +11,6 @@
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
-echo .
 
 DIGOPTS="-p ${PORT}"
 RESOLVOPTS="-p ${PORT}"
index 64d7f94b00a71f4a2698b1f2b3faa931b4510e89..38cf775c73204f883ef33f1e52940d52afee24ab 100644 (file)
@@ -17,7 +17,7 @@ $FEATURETEST --rpz-nsdname || ret=1
 $FEATURETEST --rpz-nsip || ret=1
 
 if [ $ret != 0 ]; then
-    echo "I:This test requires NSIP AND NSDNAME support in RPZ." >&2
+    echo_i "This test requires NSIP AND NSDNAME support in RPZ." >&2
     exit 1
 fi
 
@@ -27,6 +27,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index b92db86cf96a7f953e5c376ece720aad07790acc..31fa9ac31ad7fd90ff60d385a32f6017386e9fca 100644 (file)
@@ -18,6 +18,6 @@ if $KEYGEN -q -a RSAMD5 -b 512 -n zone -r $RANDFILE foo > /dev/null 2>&1
 then
     rm -f Kfoo*
 else
-    echo "I:This test requires that --with-openssl was used." >&2
+    echo_i "This test requires that --with-openssl was used." >&2
     exit 255
 fi
index fa665361dabfa1b805aa9a3116cff6ca6b14bbbd..d2ca8fc2bf509a7ee780d5a51ad383a048f1d0f3 100644 (file)
@@ -16,6 +16,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index 36e0637fd0e4ed66b9451d053eec3c60d7c1ce81..ef35d1122756a6d0d9ef20ca1ed236fb6e158658 100644 (file)
@@ -27,11 +27,11 @@ do
        $PERL update.pl -s 10.53.0.2 -p 5300 zone00000$i.example. &
 done
 
-echo "I:waiting for background processes to finish"
+echo_i "waiting for background processes to finish"
 wait
 
-echo "I:killing reload loop"
+echo_i "killing reload loop"
 kill `cat reload.pid`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 86ca5a23806811a913aaedc99fb22f858abcca57..bf473fa381039e517f61a557f89038a323e05d5d 100644 (file)
@@ -61,8 +61,8 @@ then
     rm -f Kfoo*
 else
     if test $quiet -eq 0; then
-        echo "I:This test requires support for $msg1" >&2
-        echo "I:configure with $msg2" >&2
+        echo_i "This test requires support for $msg1" >&2
+        echo_i "configure with $msg2" >&2
     fi
     exit 255
 fi
index a0749ed8cc52cf1fa7f9541e14c8bff3c6923a44..b265156e07b39dbfd6572146720e01bd185fd988 100644 (file)
@@ -15,92 +15,101 @@ SYSTEMTESTTOP=..
 DIGOPTS="@10.53.0.1 -p 5300"
 
 status=0
+n=1
 
-echo "I:generating new DH key"
+echo_i "generating new DH key ($n)"
 ret=0
 dhkeyname=`$KEYGEN -T KEY -a DH -b 768 -n host -r $RANDFILE client` || ret=1
 if [ $ret != 0 ]; then
-       echo "I:failed"
-       status=`expr $status + $ret`
-       echo "I:exit status: $status"
+       echo_i "failed"
+       status=$((status+ret))
+       echo_i "exit status: $status"
        exit $status
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
 for owner in . foo.example.
 do
-       echo "I:creating new key using owner name \"$owner\""
+       echo_i "creating new key using owner name \"$owner\" ($n)"
        ret=0
        keyname=`$KEYCREATE $dhkeyname $owner` || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
-               status=`expr $status + $ret`
-               echo "I:exit status: $status"
+               echo_i "failed"
+               status=$((status+ret))
+               echo_i "exit status: $status"
                exit $status
        fi
        status=`expr $status + $ret`
+       n=$((n+1))
 
-       echo "I:checking the new key"
+       echo_i "checking the new key ($n)"
        ret=0
        $DIG $DIGOPTS . ns -k $keyname > dig.out.1 || ret=1
        grep "status: NOERROR" dig.out.1 > /dev/null || ret=1
        grep "TSIG.*hmac-md5.*NOERROR" dig.out.1 > /dev/null || ret=1
        grep "Some TSIG could not be validated" dig.out.1 > /dev/null && ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=`expr $status + $ret`
+       n=$((n+1))
 
-       echo "I:deleting new key"
+       echo_i "deleting new key ($n)"
        ret=0
        $KEYDELETE $keyname || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=`expr $status + $ret`
+       n=$((n+1))
 
-       echo "I:checking that new key has been deleted"
+       echo_i "checking that new key has been deleted ($n)"
        ret=0
        $DIG $DIGOPTS . ns -k $keyname > dig.out.2 || ret=1
        grep "status: NOERROR" dig.out.2 > /dev/null && ret=1
        grep "TSIG.*hmac-md5.*NOERROR" dig.out.2 > /dev/null && ret=1
        grep "Some TSIG could not be validated" dig.out.2 > /dev/null || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=`expr $status + $ret`
+       n=$((n+1))
 done
 
-echo "I:creating new key using owner name bar.example."
+echo_i "creating new key using owner name bar.example. ($n)"
 ret=0
 keyname=`$KEYCREATE $dhkeyname bar.example.` || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
-       status=`expr $status + $ret`
-        echo "I:exit status: $status"
+        echo_i "failed"
+       status=$((status+ret))
+        echo_i "exit status: $status"
         exit $status
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:checking the key with 'rndc tsig-list'"
+echo_i "checking the key with 'rndc tsig-list' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-list > rndc.out.1
 grep "key \"bar.example.server" rndc.out.1 > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:using key in a request"
+echo_i "using key in a request ($n)"
 ret=0
 $DIG $DIGOPTS -k $keyname txt.example txt > dig.out.3 || ret=1
 grep "status: NOERROR" dig.out.3 > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:deleting the key with 'rndc tsig-delete'"
+echo_i "deleting the key with 'rndc tsig-delete' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-delete bar.example.server > /dev/null || ret=1
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-list > rndc.out.2
@@ -108,38 +117,42 @@ grep "key \"bar.example.server" rndc.out.2 > /dev/null && ret=1
 $DIG $DIGOPTS -k $keyname txt.example txt > dig.out.4 || ret=1
 grep "TSIG could not be validated" dig.out.4 > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:recreating the bar.example. key"
+echo_i "recreating the bar.example. key ($n)"
 ret=0
 keyname=`$KEYCREATE $dhkeyname bar.example.` || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
-       status=`expr $status + $ret`
-        echo "I:exit status: $status"
+        echo_i "failed"
+       status=$((status+ret))
+        echo_i "exit status: $status"
         exit $status
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:checking the new key with 'rndc tsig-list'"
+echo_i "checking the new key with 'rndc tsig-list' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-list > rndc.out.3
 grep "key \"bar.example.server" rndc.out.3 > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:using the new key in a request"
+echo_i "using the new key in a request ($n)"
 ret=0
 $DIG $DIGOPTS -k $keyname txt.example txt > dig.out.5 || ret=1
 grep "status: NOERROR" dig.out.5 > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=`expr $status + $ret`
+n=$((n+1))
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 7dd19e450eabd63bcaf65d6028efb9a62dc1707b..657bc8e2b64fcc6f12d78e4adcd81a22882455ab 100644 (file)
@@ -15,7 +15,7 @@
 set -e
 
 if test -z "$PERL"; then
-    echo "I:This test requires Perl." >&2
+    echo_i "This test requires Perl." >&2
     exit 1
 fi
 
index ed41e1d64be702bae74b190d51cbb9764ebd4c32..e0c2903c49ef5e7be591c737bbb5bbf538b63199 100644 (file)
@@ -208,14 +208,14 @@ if [ $ret -eq 1 ] ; then
        echo_i "failed"; status=1
 fi
 
-echo "I:check that multiple dnssec-keygen calls don't emit dns_dnssec_findmatchingkeys warning"
+echo_i "check that multiple dnssec-keygen calls don't emit dns_dnssec_findmatchingkeys warning"
 ret=0
 $KEYGEN -r $RANDFILE -a hmac-sha256 -b 128 -n host example.net > keygen.out1 2>&1 || ret=1
 grep dns_dnssec_findmatchingkeys keygen.out1 > /dev/null && ret=1
 $KEYGEN -r $RANDFILE -a hmac-sha256 -b 128 -n host example.net > keygen.out2 2>&1 || ret=1
 grep dns_dnssec_findmatchingkeys keygen.out2 > /dev/null && ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i " failed"; status=1
 fi
 
 echo_i "check that a 'BADTIME' response with 'QR=0' is handled as a request"
index 083386cfde60ef01ef630e741265ebed12fda528..456ce61224ba01c5b6c77fa5b199dee5fd8f6228 100644 (file)
@@ -32,9 +32,9 @@ update add $host $cmd
 send
 answer
 EOF
-    echo "I:testing update for $host $type $cmd"
+    echo_i "testing update for $host $type $cmd"
     $NSUPDATE -g -d ns1/update.txt > nsupdate.out${num} 2>&1 || {
-       echo "I:update failed for $host $type $cmd"
+       echo_i "update failed for $host $type $cmd"
        sed "s/^/I:/" nsupdate.out${num}
        return 1
     }
@@ -43,20 +43,20 @@ EOF
     tkeyout=`awk '/recvmsg reply from GSS-TSIG query/,/Sending update to/' nsupdate.out${num}`
     pattern="recvmsg reply from GSS-TSIG query .* opcode: QUERY, status: NOERROR, id: .* flags: qr; QUESTION: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;.* ANY TKEY ;; ANSWER SECTION: .* 0 ANY TKEY gss-tsig\. .* ;; TSIG PSEUDOSECTION: .* 0 ANY TSIG gss-tsig\. .* NOERROR 0"
     echo $tkeyout | grep "$pattern" > /dev/null || {
-       echo "I:bad tkey response (not tsig signed)"
+       echo_i "bad tkey response (not tsig signed)"
        return 1
     }
 
     # Weak verification that TKEY response is signed.
     grep -q "flags: qr; QUESTION: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1" nsupdate.out${num} || {
-       echo "I:bad tkey response (not tsig signed)"
+       echo_i "bad tkey response (not tsig signed)"
        return 1
     }
 
     out=`$DIG $DIGOPTS -t $type -q $host | egrep "^${host}"`
     lines=`echo "$out" | grep "$digout" | wc -l`
     [ $lines -eq 1 ] || {
-       echo "I:dig output incorrect for $host $type $cmd: $out"
+       echo_i "dig output incorrect for $host $type $cmd: $out"
        return 1
     }
     return 0
@@ -67,21 +67,21 @@ EOF
 KRB5CCNAME="FILE:"`pwd`/ns1/administrator.ccache
 export KRB5CCNAME
 
-echo "I:testing updates to testdc1 as administrator ($n)"
+echo_i "testing updates to testdc1 as administrator ($n)"
 ret=0
 test_update $n testdc1.example.nil. A "86400 A 10.53.0.10" "10.53.0.10" || ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing updates to testdc2 as administrator ($n)"
+echo_i "testing updates to testdc2 as administrator ($n)"
 ret=0
 test_update $n testdc2.example.nil. A "86400 A 10.53.0.11" "10.53.0.11" || ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing updates to denied as administrator ($n)"
+echo_i "testing updates to denied as administrator ($n)"
 ret=0
 test_update $n denied.example.nil. TXT "86400 TXT helloworld" "helloworld" > /dev/null && ret=1
 n=$((n+1))
@@ -93,28 +93,28 @@ status=$((status+ret))
 KRB5CCNAME="FILE:"`pwd`/ns1/testdenied.ccache
 export KRB5CCNAME
 
-echo "I:testing updates to denied (A) as a user ($n)"
+echo_i "testing updates to denied (A) as a user ($n)"
 ret=0
 test_update $n testdenied.example.nil. A "86400 A 10.53.0.12" "10.53.0.12" > /dev/null && ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing updates to denied (TXT) as a user ($n)"
+echo_i "testing updates to denied (TXT) as a user ($n)"
 ret=0
 test_update $n testdenied.example.nil. TXT "86400 TXT helloworld" "helloworld" || ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing external update policy (CNAME) ($n)"
+echo_i "testing external update policy (CNAME) ($n)"
 ret=0
 test_update $n testcname.example.nil. CNAME "86400 CNAME testdenied.example.nil" "testdenied" > /dev/null && ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing external update policy (CNAME) with auth sock ($n)"
+echo_i "testing external update policy (CNAME) with auth sock ($n)"
 ret=0
 $PERL ./authsock.pl --type=CNAME --path=ns1/auth.sock --pidfile=authsock.pid --timeout=120 > /dev/null 2>&1 &
 sleep 1
@@ -123,14 +123,14 @@ n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing external update policy (A) ($n)"
+echo_i "testing external update policy (A) ($n)"
 ret=0
 test_update $n testcname.example.nil. A "86400 A 10.53.0.13" "10.53.0.13" > /dev/null && ret=1
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:testing external policy with SIG(0) key ($n)"
+echo_i "testing external policy with SIG(0) key ($n)"
 ret=0
 $NSUPDATE -R $RANDFILE -k ns1/Kkey.example.nil.*.private <<END > /dev/null 2>&1 || ret=1
 server 10.53.0.1 ${PORT}
@@ -140,12 +140,12 @@ send
 END
 output=`$DIG $DIGOPTS +short cname fred.example.nil.`
 [ -n "$output" ] || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:ensure too long realm name is fatal in non-interactive mode ($n)"
+echo_i "ensure too long realm name is fatal in non-interactive mode ($n)"
 ret=0
 $NSUPDATE <<END > nsupdate.out${n} 2>&1 && ret=1
     realm namenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamename
@@ -156,20 +156,20 @@ n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-echo "I:ensure too long realm name is not fatal in interactive mode ($n)"
+echo_i "ensure too long realm name is not fatal in interactive mode ($n)"
 ret=0
 $NSUPDATE -i <<END > nsupdate.out${n} 2>&1 || ret=1
     realm namenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamenamename
 END
 grep "realm is too long" nsupdate.out${n} > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 n=$((n+1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
-[ $status -eq 0 ] && echo "I:tsiggss tests all OK"
+[ $status -eq 0 ] && echo_i "tsiggss tests all OK"
 
 kill `cat authsock.pid`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index ae845c2a0ff8c4202af3e1ab673325e184948c19..deb9a419abe0b09c72d00863a7710db2a3d1bae6 100644 (file)
@@ -24,7 +24,7 @@ do
        echo 10.0.0.1 | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -37,7 +37,7 @@ do
        echo '"hello"' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -50,7 +50,7 @@ do
        echo '\# 1 00' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -77,7 +77,7 @@ do
        echo '\# 4 0A000001' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -90,7 +90,7 @@ do
        echo '"hello"' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -103,7 +103,7 @@ do
        echo '\# 1 00' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
@@ -116,7 +116,7 @@ do
        grep "SERVFAIL" dig.out > /dev/null || ret=1
        if [ $ret != 0 ]
        then
-               echo "#$i failed"
+               echo_i "#$i failed"
        fi
        status=`expr $status + $ret`
 done
index 391e225c61384a031e6d7b0dc79ae89db744a5b6..cb1c9c94dcf200b504e1f7a7ae644ae74d85a3dc 100644 (file)
@@ -88,7 +88,7 @@ ret=0
 one=`$DIG $SHORTOPTS -b 10.53.0.2 @10.53.0.2 b.clone a`
 two=`$DIG $SHORTOPTS -b 10.53.0.4 @10.53.0.2 b.clone a`
 if [ "$one" != "$two" ]; then
-        echo "'$one' does not match '$two'"
+        echo_i "'$one' does not match '$two'"
         ret=1
 fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -100,18 +100,18 @@ one=`$DIG $SHORTOPTS -b 10.53.0.2 @10.53.0.2 child.clone txt`
 two=`$DIG $SHORTOPTS -b 10.53.0.4 @10.53.0.2 child.clone txt`
 three=`$DIG $SHORTOPTS @10.53.0.3 child.clone txt`
 four=`$DIG $SHORTOPTS @10.53.0.5 child.clone txt`
-echo "$three" | grep NS3 > /dev/null || { ret=1; echo "expected response from NS3 got '$three'"; }
-echo "$four" | grep NS5 > /dev/null || { ret=1; echo "expected response from NS5 got '$four'"; }
+echo "$three" | grep NS3 > /dev/null || { ret=1; echo_i "expected response from NS3 got '$three'"; }
+echo "$four" | grep NS5 > /dev/null || { ret=1; echo_i "expected response from NS5 got '$four'"; }
 if [ "$one" = "$two" ]; then
-        echo "'$one' matches '$two'"
+        echo_i "'$one' matches '$two'"
         ret=1
 fi
 if [ "$one" != "$three" ]; then
-        echo "'$one' does not match '$three'"
+        echo_i "'$one' does not match '$three'"
         ret=1
 fi
 if [ "$two" != "$four" ]; then
-        echo "'$two' does not match '$four'"
+        echo_i "'$two' does not match '$four'"
         ret=1
 fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
index fa665361dabfa1b805aa9a3116cff6ca6b14bbbd..d2ca8fc2bf509a7ee780d5a51ad383a048f1d0f3 100644 (file)
@@ -16,6 +16,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi