]> 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 07:54:24 +0000 (09:54 +0200)
In many instances 'echo "I:' construct was used where echo_i function
should have been.

15 files changed:
bin/tests/system/delzone/tests.sh
bin/tests/system/dialup/tests.sh
bin/tests/system/ecdsa/tests.sh
bin/tests/system/eddsa/tests.sh
bin/tests/system/inline/ns3/sign.sh
bin/tests/system/mkeys/setup.sh
bin/tests/system/mkeys/tests.sh
bin/tests/system/resolver/tests.sh
bin/tests/system/rpzrecurse/tests.sh
bin/tests/system/stress/tests.sh
bin/tests/system/testcrypto.sh
bin/tests/system/tkey/tests.sh
bin/tests/system/tsiggss/tests.sh
bin/tests/system/unknown/tests.sh
bin/tests/system/views/tests.sh

index 7aaa5fe1acac33cfd85c56ee70fbff492c1dff22..73b098ca337f8bbc2c770e49ce2ceac7e25023d8 100755 (executable)
@@ -15,20 +15,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')
@@ -41,7 +41,7 @@ for i in range(20000):
 EOF
     )
     time (
-        echo "I:deleting"
+        echo_i "deleting"
         $PYTHON << EOF
 import sys
 sys.path.insert(0, '../../../../bin/python')
@@ -54,9 +54,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 fc5359b322620f64597991bc2291391d695b0ea2..8c150cdeeb374973234af2742cba8d99178926d0 100644 (file)
@@ -20,7 +20,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
@@ -35,11 +35,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
@@ -54,9 +54,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 f966181ec2fe68bd27074b416b1e4229cafb7121..b2c7401e3fc8403361e76bca4e6dcf89deb4f7a0 100644 (file)
@@ -22,15 +22,15 @@ dig_with_opts() {
 
 
 # Check the example. domain
-echo "I:checking that positive validation works ($n)"
+echo_i "checking that positive validation works ($n)"
 ret=0
 dig_with_opts . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1
 dig_with_opts . @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=$((n+1))
-if [ $ret != 0 ]; then echo "I:failed"; fi
+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 a1f4e80b5f8795f55b6ba9cca87e8e8ac1f6679d..9055b557ae5c3c34cf94a29853962505d2cc2d14 100644 (file)
@@ -22,29 +22,29 @@ dig_with_opts() {
 
 # Check the example. domain
 
-echo "I:checking that positive validation works ($n)"
+echo_i "checking that positive validation works ($n)"
 ret=0
 dig_with_opts . @10.53.0.1 soa > dig.out.ns1.test$n || ret=1
 dig_with_opts . @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=$((n+1))
-if [ $ret != 0 ]; then echo "I:failed"; fi
+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=$((n+1))
-if [ $ret != 0 ]; then echo "I:failed"; fi
+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
@@ -59,8 +59,8 @@ grep 'Sxv5OWbf81Rq7Yu60npabODB0QFPb/rkW3kU' ns2/example.com.db.signed > /dev/nul
 grep 'ZmQ0YQUA' ns2/example.com.db.signed > /dev/null || ret=1
 
 n=$((n+1))
-if [ $ret != 0 ]; then echo "I:failed"; fi
+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 6f6f2b13e9156e7bca36b53c035713355362dea6..ea8bc18340e21abee9afeadb479e04b25259309b 100755 (executable)
@@ -149,9 +149,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" )
+        ( echo_i "importkey failed: $alg" )
     rm -f $k2.private 
     mv $k2.key a-file
     $IMPORTKEY -f a-file $zone > /dev/null 2>&1 ||
-        ( echo "importkey failed: $alg" )
+        ( echo_i "importkey failed: $alg" )
 done
index 12f8e607cd23ebc339b582af41290d8087e8287f..16fa19d6b40ad72891ab5fe14f392f704a9c52a3 100644 (file)
@@ -9,9 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-echo mkeys_beg
 . ../conf.sh
-echo mkeys_end
 
 copy_setports ns1/named1.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
index 9179fc02cb48320e97ec81d810b0fb28837d810f..31b3b64ad85a40ed705ec4c91ddc52df176274b0 100644 (file)
@@ -378,26 +378,26 @@ 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) || true
-[ "$count" -eq 4 ] || { echo "keyid: count ($count) != 4"; ret=1; }
+[ "$count" -eq 4 ] || { echo_i "keyid: count ($count) != 4"; ret=1; }
 # one revoked
 count=$(grep -c "trust revoked" rndc.out.1.$n) || true
-[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
+[ "$count" -eq 1 ] || { echo_i "trust revoked count ($count) != 1"; ret=1; }
 # two pending
 count=$(grep -c "trust pending" rndc.out.1.$n) || true
-[ "$count" -eq 2 ] || { echo "trust pending count ($count) != 2"; ret=1; }
+[ "$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) || true
-[ "$count" -eq 3 ] || { echo "keyid: count ($count) != 3"; ret=1; }
+[ "$count" -eq 3 ] || { echo_i "keyid: count ($count) != 3"; ret=1; }
 # one revoked
 count=$(grep -c "trust revoked" rndc.out.2.$n) || true
-[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
+[ "$count" -eq 1 ] || { echo_i "trust revoked count ($count) != 1"; ret=1; }
 # one pending
 count=$(grep -c "trust pending" rndc.out.2.$n) || true
-[ "$count" -eq 1 ] || { echo "trust pending count ($count) != 1"; ret=1; }
+[ "$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
@@ -513,18 +513,18 @@ 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) || true
-[ "$count" -eq 1 ] || { echo "'keyid:' count ($count) != 1"; ret=1; }
+[ "$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) || true
-[ "$count" -eq 1 ] || { echo "'keyid: $originalid' count ($count) != 1"; ret=1; }
+[ "$count" -eq 1 ] || { echo_i "'keyid: $originalid' count ($count) != 1"; ret=1; }
 # not revoked
 count=$(grep -c "REVOKE" rndc.out.$n) || true
-[ "$count" -eq 0 ] || { echo "'REVOKE' count ($count) != 0"; ret=1; }
+[ "$count" -eq 0 ] || { echo_i "'REVOKE' count ($count) != 0"; ret=1; }
 # trust is still current
 count=$(grep -c "trust" rndc.out.$n) || true
-[ "$count" -eq 1 ] || { echo "'trust' count != 1"; ret=1; }
+[ "$count" -eq 1 ] || { echo_i "'trust' count != 1"; ret=1; }
 count=$(grep -c "trusted since" rndc.out.$n) || true
-[ "$count" -eq 1 ] || { echo "'trusted since' count != 1"; ret=1; }
+[ "$count" -eq 1 ] || { echo_i "'trusted since' count != 1"; ret=1; }
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
index 7c4a09cb21dae1a2cafc7e293b8c17a4a2e41a04..3874361fb558f6506f41d2bca62864f1f13c4296 100755 (executable)
@@ -10,7 +10,6 @@
 # information regarding copyright ownership.
 
 . ../conf.sh
-echo .
 
 DIGOPTS="-p ${PORT}"
 RESOLVOPTS="-p ${PORT}"
index 320ee08314b912ec4a956a77266e2a8e3c9b43e3..c877ebf3d61847a74a2133f8cf5467a7b3c4df98 100644 (file)
@@ -258,7 +258,7 @@ for mode in native dnsrps; do
     echo_i "adding an NSDNAME policy"
     cp ns2/db.6a.00.policy.local ns2/saved.policy.local
     cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/I:ns2 /' | cat_i
+    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
     test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
     sleep 1
     t=`expr $t + 1`
@@ -268,7 +268,7 @@ for mode in native dnsrps; do
     sleep 1
     echo_i "removing the NSDNAME policy"
     cp ns2/db.6c.00.policy.local ns2/db.6a.00.policy.local
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/I:ns2 /' | cat_i
+    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
     test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
     sleep 1
     echo_i "resuming authority server"
@@ -310,7 +310,7 @@ for mode in native dnsrps; do
     fi
     echo_i "adding an NSDNAME policy"
     cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/I:ns2 /' | cat_i
+    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
     test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
     sleep 1
     t=`expr $t + 1`
index 5c3adffdde885a7f7c6373d2e95a387f67f54b61..aa168d14be57fe56b084f409faca1df45e272038 100644 (file)
@@ -26,11 +26,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 012d6891242589b0a6193fdceb8ab8028e0f301c..525f9c8ce87f20c0b42782184b2a33f7e023a3ec 100644 (file)
@@ -65,8 +65,8 @@ then
     rm -f Kfoo*
 else
     if test $quiet -eq 0; then
-        echo "I:This test requires support for $msg" >&2
-        echo "I:configure with --with-openssl, or --enable-native-pkcs11" \
+        echo_i "This test requires support for $msg" >&2
+        echo_i "configure with --with-openssl, or --enable-native-pkcs11" \
             "--with-pkcs11" >&2
     fi
     exit 255
index 89a93ab93d86837aa6ec5037adcb857715b7ef33..3dcfa00030dfd2f15fbe7b7d977608c2ee812810 100644 (file)
@@ -20,13 +20,13 @@ dig_with_opts() {
 status=0
 n=1
 
-echo "I:generating new DH key ($n)"
+echo_i "generating new DH key ($n)"
 ret=0
 dhkeyname=$($KEYGEN -T KEY -a DH -b 768 -n host client) || ret=1
 if [ $ret != 0 ]; then
-       echo "I:failed"
+       echo_i "failed"
        status=$((status+ret))
-       echo "I:exit status: $status"
+       echo_i "exit status: $status"
        exit $status
 fi
 status=$((status+ret))
@@ -34,85 +34,85 @@ n=$((n+1))
 
 for owner in . foo.example.
 do
-       echo "I:creating new key using owner name \"$owner\" ($n)"
+       echo_i "creating new key using owner name \"$owner\" ($n)"
        ret=0
        keyname=$($KEYCREATE 10.53.0.1 "$PORT" "$dhkeyname" $owner) || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
                status=$((status+ret))
-               echo "I:exit status: $status"
+               echo_i "exit status: $status"
                exit $status
        fi
        status=$((status+ret))
        n=$((n+1))
 
-       echo "I:checking the new key ($n)"
+       echo_i "checking the new key ($n)"
        ret=0
        dig_with_opts txt txt.example -k "$keyname" > dig.out.test$n || ret=1
        grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
        grep "TSIG.*hmac-md5.*NOERROR" dig.out.test$n > /dev/null || ret=1
        grep "Some TSIG could not be validated" dig.out.test$n > /dev/null && ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=$((status+ret))
        n=$((n+1))
 
-       echo "I:deleting new key ($n)"
+       echo_i "deleting new key ($n)"
        ret=0
        $KEYDELETE 10.53.0.1 "$PORT" "$keyname" || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=$((status+ret))
        n=$((n+1))
 
-       echo "I:checking that new key has been deleted ($n)"
+       echo_i "checking that new key has been deleted ($n)"
        ret=0
        dig_with_opts txt txt.example -k "$keyname" > dig.out.test$n || ret=1
        grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
        grep "TSIG.*hmac-md5.*NOERROR" dig.out.test$n > /dev/null && ret=1
        grep "Some TSIG could not be validated" dig.out.test$n > /dev/null || ret=1
        if [ $ret != 0 ]; then
-               echo "I:failed"
+               echo_i "failed"
        fi
        status=$((status+ret))
        n=$((n+1))
 done
 
-echo "I:creating new key using owner name bar.example. ($n)"
+echo_i "creating new key using owner name bar.example. ($n)"
 ret=0
 keyname=$($KEYCREATE 10.53.0.1 "$PORT" "$dhkeyname" bar.example.) || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
        status=$((status+ret))
-        echo "I:exit status: $status"
+        echo_i "exit status: $status"
         exit $status
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:checking the key with 'rndc tsig-list' ($n)"
+echo_i "checking the key with 'rndc tsig-list' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p "$CONTROLPORT" tsig-list > rndc.out.test$n
 grep "key \"bar.example.server" rndc.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:using key in a request ($n)"
+echo_i "using key in a request ($n)"
 ret=0
 dig_with_opts -k "$keyname" txt.example txt > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:deleting the key with 'rndc tsig-delete' ($n)"
+echo_i "deleting the key with 'rndc tsig-delete' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p "$CONTROLPORT" tsig-delete bar.example.server > /dev/null || ret=1
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p "$CONTROLPORT" tsig-list > rndc.out.test$n
@@ -120,42 +120,42 @@ grep "key \"bar.example.server" rndc.out.test$n > /dev/null && ret=1
 dig_with_opts -k "$keyname" txt.example txt > dig.out.test$n || ret=1
 grep "TSIG could not be validated" dig.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:recreating the bar.example. key ($n)"
+echo_i "recreating the bar.example. key ($n)"
 ret=0
 keyname=$($KEYCREATE 10.53.0.1 "$PORT" "$dhkeyname" bar.example.) || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
        status=$((status+ret))
-        echo "I:exit status: $status"
+        echo_i "exit status: $status"
         exit $status
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:checking the new key with 'rndc tsig-list' ($n)"
+echo_i "checking the new key with 'rndc tsig-list' ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p "$CONTROLPORT" tsig-list > rndc.out.test$n
 grep "key \"bar.example.server" rndc.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:using the new key in a request ($n)"
+echo_i "using the new key in a request ($n)"
 ret=0
 dig_with_opts -k "$keyname" txt.example txt > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then
-        echo "I:failed"
+        echo_i "failed"
 fi
 status=$((status+ret))
 n=$((n+1))
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f7f006688fae5ed8849b02fbf3b220d6a65cc0c8..0d671032ec77c38859177578913033db6511ec27 100644 (file)
@@ -31,9 +31,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
     }
@@ -42,20 +42,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
@@ -66,21 +66,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))
@@ -92,28 +92,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
@@ -122,14 +122,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 -k ns1/Kkey.example.nil.*.private <<END > /dev/null 2>&1 || ret=1
 server 10.53.0.1 ${PORT}
@@ -139,12 +139,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
@@ -155,20 +155,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 ac35569abbee50937cb1d2058dab9a954d6769f9..927d917e4339504a47fc859311a57a789a4f67c2 100644 (file)
@@ -23,7 +23,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
@@ -36,7 +36,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
@@ -49,7 +49,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
@@ -76,7 +76,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
@@ -89,7 +89,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
@@ -102,7 +102,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
@@ -115,7 +115,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 9903e39f2167a886001eb871d32fdd9dfcb5bc4c..01ea650652506e506806e00ab1e31d9bb6142994 100644 (file)
@@ -87,7 +87,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
@@ -99,18 +99,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