From 5efcb3a3e2d29a57311ea5123dbe7927c6ee90fc Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Mon, 17 Feb 2014 08:40:02 -0800 Subject: [PATCH] [master] fix test errors - require 5.006_001 - cut off the least significant figures of rrsig dates before comparison to avoid integer overflow --- bin/tests/system/formerr/formerr.pl | 2 +- bin/tests/system/smartsign/tests.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/formerr/formerr.pl b/bin/tests/system/formerr/formerr.pl index 9a2d237b1d..2eb609090c 100644 --- a/bin/tests/system/formerr/formerr.pl +++ b/bin/tests/system/formerr/formerr.pl @@ -45,7 +45,7 @@ # # XXX: Doesn't support IPv6 yet -require 5.006.001; +require 5.006_001; use strict; use Getopt::Std; diff --git a/bin/tests/system/smartsign/tests.sh b/bin/tests/system/smartsign/tests.sh index 2b51e379ae..041bb411bf 100644 --- a/bin/tests/system/smartsign/tests.sh +++ b/bin/tests/system/smartsign/tests.sh @@ -314,10 +314,13 @@ status=`expr $status + $ret` echo "I:checking RRSIG expiry date correctness" dnskey_expiry=`$CHECKZONE -o - $czone $cfile.signed 2> /dev/null | - awk '$4 == "RRSIG" && $5 == "DNSKEY" {print $9; exit}'` + awk '$4 == "RRSIG" && $5 == "DNSKEY" {print $9; exit}' | + cut -c1-10` soa_expiry=`$CHECKZONE -o - $czone $cfile.signed 2> /dev/null | - awk '$4 == "RRSIG" && $5 == "SOA" {print $9; exit}'` + awk '$4 == "RRSIG" && $5 == "SOA" {print $9; exit}' | + cut -c1-10` [ $dnskey_expiry -gt $soa_expiry ] || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` echo "I:waiting 30 seconds for key activation"