mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
awk -v is not portable, add floating point arithmetic effects
This commit is contained in:
@@ -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.21 2011/04/29 21:37:14 each Exp $
|
||||
# $Id: tests.sh,v 1.22 2011/05/01 11:29:20 marka Exp $
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
@@ -893,17 +893,20 @@ status=`expr $status + $ret`
|
||||
# last event scheduled is precisely that far in the future.
|
||||
check_interval () {
|
||||
awk '/next key event/ {print $2 ":" $9}' $1/named.run |
|
||||
awk -F: -vinterval=$2 '
|
||||
sed 's/\.//g' |
|
||||
awk -F: '
|
||||
{
|
||||
if ($6 == 0)
|
||||
$6 = 25;
|
||||
x = ($6+ $5*60 + $4*3600) - ($3 + $2*60 + $1*3600);
|
||||
x = ($6+ $5*60000 + $4*3600000) -
|
||||
($3+ $2*60000 + $1*3600000);
|
||||
x = x/1000;
|
||||
if (x != int(x))
|
||||
x = int(x + 1);
|
||||
if (x > interval)
|
||||
exit (1);
|
||||
}
|
||||
END { if (x != interval) exit(1) }'
|
||||
END { if (x != interval) exit(1) }' interval=$2
|
||||
return $?
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user