]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix testing errors
authorEvan Hunt <each@isc.org>
Fri, 11 Jan 2019 22:37:21 +0000 (14:37 -0800)
committerEvan Hunt <each@isc.org>
Mon, 14 Jan 2019 02:34:35 +0000 (21:34 -0500)
- the checkprivate function in the dnssec test set ret=0, erasing
  results from previous tests and making the test appear to have passed
  when it shouldn't have
- checkprivate needed a delay loop to ensure there was time for all
  private signing records to be updated before the test

(cherry picked from commit 82e83d5dc7abdb05908c7971571eaa2d673d8691)

bin/tests/system/dnssec/tests.sh

index 78103cd9d97e661eec4bd7667ec81c8b5381b4cb..b516c241a617d2383b46de61aa3fd0a42cc21c0e 100644 (file)
@@ -40,16 +40,18 @@ showprivate () {
 }
 
 # check that signing records are marked as complete
-checkprivate () {
-    ret=0
-    x=`showprivate "$@"`
-    echo $x | grep incomplete >/dev/null 2>&1 && ret=1
-    [ $ret = 1 ] && {
-        echo "$x"
-        echo_i "failed"
+checkprivate () { (
+    for i in 1 2 3 4 5 6 7 8 9 10; do
+        ret=0
+        showprivate "$@" | grep incomplete >/dev/null 2>&1 && { ret=1; sleep 1; continue; }
+        break
+    done
+    [ $ret -eq 1 ] && {
+        echo_d "$1 signing incomplete"
+        return 1
     }
-    return $ret
-}
+    return 0
+}
 
 # check that a zone file is raw format, version 0
 israw0 () {