2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Tweak timestamp checking in the cds system test

Given the characteristics of the three timestamps involved in file
modification time checks in the cds system test (each one is an hour
apart from the next), reduce the resolution of these checks to 1 minute.
This will prevent intermittent false negatives caused by exceeding the
currently allowed difference of 9 seconds between file modification
times without making the test moot.

Also note that by using abs(), checkmtime.pl allows the cds system test
to pass when the modification time of the checked file is less than an
hour (or two hours for the second check) in the past.  This should never
happen, so remove abs() from the condition checked by checkmtime.pl.
This commit is contained in:
Michał Kępień
2018-03-08 15:40:18 +01:00
committed by Evan Hunt
parent 7c1de1edec
commit ab2913a29f

View File

@@ -13,4 +13,4 @@ my $target = shift;
my $file = shift;
my $mtime = time - (stat $file)[9];
die "bad mtime $mtime"
unless abs($mtime - $target) < 10;
unless ($mtime - $target >= 0 && $mtime - $target < 60);