Subject: | [PATCH] better diagnostics for itimer.t |
Date: | Thu, 21 Aug 2014 16:58:26 +0100 |
To: | bug-Time-HiRes [...] rt.cpan.org |
From: | Dave Mitchell <davem [...] iabyn.com> |
My blead commit 65dd9533e90d8e1ea84c091ff43133132c667a1c temporarily
added some extra diagnostics to cpan/Time-HiRes/t/itimer.t to help track
down a smoke issue. Since the OS issue with the smoker has now been fixed,
I've reverted the patch in blead (Time-HiRes being a CPAN-first module).
But I'm making you aware of that commit in case you want to incorporate it
into a new release:
diff --git a/cpan/Time-HiRes/t/itimer.t b/cpan/Time-HiRes/t/itimer.t
index a9ef80d..24374cd 100644
--- a/cpan/Time-HiRes/t/itimer.t
+++ b/cpan/Time-HiRes/t/itimer.t
@@ -43,7 +43,8 @@ note "setitimer: ", join(" ",
# Assume interval timer granularity of $limit * 0.5 seconds. Too bold?
my $virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
-ok defined $virt && abs($virt / 0.5) - 1 < $limit;
+ok defined $virt && abs($virt / 0.5) - 1 < $limit
+ or diag "virt=" . (defined $virt ? $virt : 'undef');
note "getitimer: ", join(" ",
Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
@@ -57,7 +58,8 @@ note "getitimer: ", join(" ",
Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL));
$virt = Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL);
-ok defined $virt && $virt == 0;
+note "at end, i=$i";
+is($virt, 0, "time left should be zero");
$SIG{VTALRM} = 'DEFAULT';
--
Red sky at night - gerroff my land!
Red sky at morning - gerroff my land!
-- old farmers' sayings #14