]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
improve failure diagnostics
authorMark Andrews <marka@isc.org>
Mon, 17 Aug 2015 07:42:58 +0000 (17:42 +1000)
committerMark Andrews <marka@isc.org>
Mon, 17 Aug 2015 07:42:58 +0000 (17:42 +1000)
bin/tests/system/mkeys/tests.sh

index 2c7fb22633e0b2e6fcb8d821ef9d07334d5b15f6..29cf002a8cf9717f4872f282d8b4f67bf9d98b70 100644 (file)
@@ -292,13 +292,13 @@ sleep 1
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.a.$n 2>&1
 # four keys listed
 count=`grep -c "keyid: " rndc.out.a.$n` 
-[ "$count" -eq 4 ] || ret=1
+[ "$count" -eq 4 ] || { echo "keyid: count ($count) != 4"; ret=1; }
 # one revoked
 count=`grep -c "trust revoked" rndc.out.a.$n` 
-[ "$count" -eq 1 ] || ret=1
+[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
 # two pending
 count=`grep -c "trust pending" rndc.out.a.$n` 
-[ "$count" -eq 2 ] || ret=1
+[ "$count" -eq 2 ] || { echo "trust pending count ($count) != 2"; ret=1; }
 $SETTIME -R now -K ns1 $standby3 > /dev/null
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . | sed 's/^/I: ns1 /'
 sleep 3
@@ -307,13 +307,13 @@ sleep 1
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.b.$n 2>&1
 # now three keys listed
 count=`grep -c "keyid: " rndc.out.b.$n` 
-[ "$count" -eq 3 ] || ret=1
+[ "$count" -eq 3 ] || { "keyid: count ($count) != 3"; ret=1; }
 # one revoked
 count=`grep -c "trust revoked" rndc.out.b.$n` 
-[ "$count" -eq 1 ] || ret=1
+[ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; }
 # one pending
 count=`grep -c "trust pending" rndc.out.b.$n` 
-[ "$count" -eq 1 ] || ret=1
+[ "$count" -eq 1 ] || { echo "trust pending count ($count) != 1"; ret=1; }
 $SETTIME -D now -K ns1 $standby3 > /dev/null
 $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . | sed 's/^/I: ns1 /'
 if [ $ret != 0 ]; then echo "I:failed"; fi