summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-19 15:42:58 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-19 15:42:58 +0000
commit58a9407439d0a351f8fbc4e66b3f56e5d81df3c0 (patch)
tree6a8da6783f920bbcd7259d7c0dd6cdf731b6132a /ext
parent6b54a40376f816c07bf5262ecec28e130b304cb8 (diff)
downloadperl-58a9407439d0a351f8fbc4e66b3f56e5d81df3c0.tar.gz
Adjust timing tolerance in threads tests, by Jerry D. Hedden
p4raw-id: //depot/perl@30634
Diffstat (limited to 'ext')
-rw-r--r--ext/threads/shared/shared.pm2
-rw-r--r--ext/threads/shared/t/waithires.t12
2 files changed, 5 insertions, 9 deletions
diff --git a/ext/threads/shared/shared.pm b/ext/threads/shared/shared.pm
index 59768a0cf6..dacd50c58b 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 b39fa4579f..a89323d229 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");
+ }
}
}
}