From: Rafael Garcia-Suarez Date: Mon, 19 Mar 2007 15:42:58 +0000 (+0000) Subject: Adjust timing tolerance in threads tests, by Jerry D. Hedden X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58a9407439d0a351f8fbc4e66b3f56e5d81df3c0;p=p5sagit%2Fp5-mst-13.2.git Adjust timing tolerance in threads tests, by Jerry D. Hedden p4raw-id: //depot/perl@30634 --- diff --git a/ext/threads/shared/shared.pm b/ext/threads/shared/shared.pm index 59768a0..dacd50c 100644 --- a/ext/threads/shared/shared.pm +++ b/ext/threads/shared/shared.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.08'; +our $VERSION = '1.08_01'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/threads/shared/t/waithires.t b/ext/threads/shared/t/waithires.t index b39fa45..a89323d 100644 --- a/ext/threads/shared/t/waithires.t +++ b/ext/threads/shared/t/waithires.t @@ -325,15 +325,11 @@ SYNCH_REFS: { if (($to < 0) || ($^O eq 'os2')) { ok(2,!$ok, "$test: timeout"); } else { - # This is a bit problematic, as scheduling and compute latencies - # can inject delays in our computation. For now, assume -10/+20% - # is reasonable - if (! ok(2, ! $ok && - ($delta > (0.9 * $to)) && - ($delta < (1.2 * $to)), - "$test: timeout")) - { + if (ok(2, ! $ok, "$test: timeout")) { + # Timing tests can be problematic + if (($delta < (0.9 * $to)) || ($delta > (1.0 + $to))) { print(STDERR "# Timeout: specified=$to actual=$delta secs.\n"); + } } } }