summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-09-15 10:12:04 +1000
committerTony Cook <tony@develop-help.com>2015-09-15 10:12:04 +1000
commitc79631a1c8b4ecf3ec1fc557c875d412058b3e47 (patch)
tree48fab56f3438f65b9fd8fa2614eb9aa27e23c377
parent29b04a70d1bf9a10be65363f3f8d6dae44cfa6fc (diff)
downloadperl-c79631a1c8b4ecf3ec1fc557c875d412058b3e47.tar.gz
prevent op/time.t failures on NetBSD 5.1
- make the watchdog time exceed the maximum time for the "very basic times test". This doesn't prevent the test from failing, but prevents the entire test script from being killed by the watchdog if the times() test does fail - do more work inside the loop, with the previous "burn cycles" loop system time was increasing but user time stayed at its starting value.
-rw-r--r--t/op/time.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/op/time.t b/t/op/time.t
index f5ce3391c0..d3b8b9c67d 100644
--- a/t/op/time.t
+++ b/t/op/time.t
@@ -12,7 +12,7 @@ plan tests => 72;
# burning tons of CPU for dates far in the future.
# watchdog() makes sure that the test script eventually exits if
# the tests are triggering the failing behavior
-watchdog(15);
+watchdog(25);
($beguser,$begsys) = times;
@@ -21,9 +21,9 @@ $beg = time;
while (($now = time) == $beg) { sleep 1 }
ok($now > $beg && $now - $beg < 10, 'very basic time test');
-
+my $x = "aaaa";
for ($i = 0; $i < 1_000_000; $i++) {
- for my $j (1..100) {}; # burn some user cycles
+ for my $j (1..1000) { ++$x; }; # burn some user cycles
($nowuser, $nowsys) = times;
$i = 2_000_000 if $nowuser > $beguser && ( $nowsys >= $begsys ||
(!$nowsys && !$begsys));