]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chech that the final time is within 10 seconds but no greater than the expected interval
authorMark Andrews <marka@isc.org>
Mon, 12 Dec 2011 06:51:12 +0000 (06:51 +0000)
committerMark Andrews <marka@isc.org>
Mon, 12 Dec 2011 06:51:12 +0000 (06:51 +0000)
bin/tests/system/autosign/tests.sh

index 03ca1ba4299e52358030111e3adfe294212589b5..a1421d8893b890f2e9188980efc94a124d83db10 100644 (file)
@@ -14,7 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.38 2011/11/27 12:04:27 marka Exp $
+# $Id: tests.sh,v 1.39 2011/12/12 06:51:12 marka Exp $
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
@@ -1062,7 +1062,7 @@ status=`expr $status + $ret`
 
 # this confirms that key events are never scheduled more than
 # 'dnssec-loadkeys-interval' minutes in the future, and that the 
-# last event scheduled is precisely that far in the future.
+# event scheduled is within 10 seconds of expected interval.
 check_interval () {
         awk '/next key event/ {print $2 ":" $9}' $1/named.run |
        sed 's/\.//g' |
@@ -1083,7 +1083,8 @@ check_interval () {
                        if (int(x) > int(interval))
                          exit (1);
                      }
-                     END { if (int(x) != int(interval)) exit(1) }' interval=$2
+                     END { if (int(x) > int(interval) ||
+                              int(x) < int(interval-10)) exit(1) }' interval=$2
         return $?
 }