Skip Menu |

This queue is for tickets about the Time-Simple CPAN distribution.

Report information
The Basics
Id: 34710
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Time-Simple

People
Owner: LGODDARD [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.053
Fixed in: (no value)



Subject: Repeated random FAILS on cpantesters
Several smoke machines have by now reported FAILs on your tests. http://bbbike2.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Time-Simple;maxver= /Time-Simple......Bailout called. Further testing stopped: # Failed test 'hr from array' # at t/Time-Simple.t line 20. # got: '22' # expected: '23' # Failed test 'stringified' # at t/Time-Simple.t line 27. # '22:59:59' # doesn't match '(?-xism:23:59:59)' # Failed test 'inc after inc' # at t/Time-Simple.t line 32. # '23:00:00' # doesn't match '(?-xism:00:00:00)' Use of uninitialized value $reason in concatenation (.) or string at /home/src/perl/repoperls/installed-perls/perl/pk3qAL1/perl-5.10.0@33646/lib/5.11.0/Test/Builder.pm line 772. make[3]: *** [test_dynamic] Error 1 make[3]: Leaving directory `/home/sand/.cpan/build/Time-Simple-0.053-uVlUfk' Hope this helps, Thanks!
On Sat Apr 05 16:49:09 2008, ANDK wrote: Show quoted text
> Several smoke machines have by now reported FAILs on your tests. > > http://bbbike2.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Time- > Simple;maxver= > > /Time-Simple......Bailout called. Further testing stopped: > > # Failed test 'hr from array' > # at t/Time-Simple.t line 20. > # got: '22' > # expected: '23' > > # Failed test 'stringified' > # at t/Time-Simple.t line 27. > # '22:59:59' > # doesn't match '(?-xism:23:59:59)' > > # Failed test 'inc after inc' > # at t/Time-Simple.t line 32. > # '23:00:00' > # doesn't match '(?-xism:00:00:00)' > Use of uninitialized value $reason in concatenation (.) or string at > /home/src/perl/repoperls/installed-perls/perl/pk3qAL1/perl- > 5.10.0@33646/lib/5.11.0/Test/Builder.pm > line 772. > make[3]: *** [test_dynamic] Error 1 > make[3]: Leaving directory `/home/sand/.cpan/build/Time-Simple-0.053- > uVlUfk' >
This is probably caused by this change in perl5.10 in conjunction with DST turned on/off: [ 30590] By: rgs on 2007/03/15 09:35:14 Log: Make the isdst argument to asctime and mktime default to -1 instead of 0, as suggested by Mike Schilli. Branch: perl ! ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod ext/POSIX/POSIX.xs However, I took a look through the source code and found serious problems. In many places localtime is used without a time argument (e.g. (localtime)[4] etc.), which means that a switch in any of the time fields while processing the function would ruin the whole calculation. Also, the dst calculation in _mktime_hms looks quite fragile. Maybe it would be better to use gmtime instead of localtime thoughout the module? Regards, Slaven
Subject: Re: [rt.cpan.org #34710] Repeated random FAILS on cpantesters
Date: Mon, 07 Apr 2008 23:11:11 +0100
To: bug-Time-Simple [...] rt.cpan.org
From: Lee Goddard <leegee [...] gmail.com>
Slaven_Rezic via RT wrote: Show quoted text
> Queue: Time-Simple > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34710 > > > On Sat Apr 05 16:49:09 2008, ANDK wrote:
>> Several smoke machines have by now reported FAILs on your tests. >> >> http://bbbike2.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Time- >> Simple;maxver= >> >> /Time-Simple......Bailout called. Further testing stopped: >> >> # Failed test 'hr from array' >> # at t/Time-Simple.t line 20. >> # got: '22' >> # expected: '23' >> >> # Failed test 'stringified' >> # at t/Time-Simple.t line 27. >> # '22:59:59' >> # doesn't match '(?-xism:23:59:59)' >> >> # Failed test 'inc after inc' >> # at t/Time-Simple.t line 32. >> # '23:00:00' >> # doesn't match '(?-xism:00:00:00)' >> Use of uninitialized value $reason in concatenation (.) or string at >> /home/src/perl/repoperls/installed-perls/perl/pk3qAL1/perl- >> 5.10.0@33646/lib/5.11.0/Test/Builder.pm >> line 772. >> make[3]: *** [test_dynamic] Error 1 >> make[3]: Leaving directory `/home/sand/.cpan/build/Time-Simple-0.053- >> uVlUfk' >>
> > This is probably caused by this change in perl5.10 in conjunction with > DST turned on/off: > > [ 30590] By: rgs on 2007/03/15 09:35:14 > Log: Make the isdst argument to asctime and mktime default to -1 > instead of 0, as suggested by Mike Schilli. > Branch: perl > ! ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod ext/POSIX/POSIX.xs > > > However, I took a look through the source code and found serious > problems. In many places localtime is used without a time argument (e.g. > (localtime)[4] etc.), which means that a switch in any of the time > fields while processing the function would ruin the whole calculation. > Also, the dst calculation in _mktime_hms looks quite fragile. Maybe it > would be better to use gmtime instead of localtime thoughout the module? > > Regards, > Slaven
I realised it was a dst bug, have no idea of 5.10 yet. I'll have a look at gmtime - sounds sensible. Was only a quick module for a little task that stood alone and wasn't owned by clients, but if it is on CPAN it should be coded properly. Thanks, Lee -- Lee Goddard Please sign the international Free Tibet petition: http://www.avaaz.org/en/tibet_end_the_violence/72.php/?cl=67109514
On Mon Apr 07 18:02:48 2008, SREZIC wrote: Show quoted text
> On Sat Apr 05 16:49:09 2008, ANDK wrote:
> > Several smoke machines have by now reported FAILs on your tests. > > > > http://bbbike2.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Time- > > Simple;maxver= > > > > /Time-Simple......Bailout called. Further testing stopped: > > > > # Failed test 'hr from array' > > # at t/Time-Simple.t line 20. > > # got: '22' > > # expected: '23' > > > > # Failed test 'stringified' > > # at t/Time-Simple.t line 27. > > # '22:59:59' > > # doesn't match '(?-xism:23:59:59)' > > > > # Failed test 'inc after inc' > > # at t/Time-Simple.t line 32. > > # '23:00:00' > > # doesn't match '(?-xism:00:00:00)' > > Use of uninitialized value $reason in concatenation (.) or string at > > /home/src/perl/repoperls/installed-perls/perl/pk3qAL1/perl- > > 5.10.0@33646/lib/5.11.0/Test/Builder.pm > > line 772. > > make[3]: *** [test_dynamic] Error 1 > > make[3]: Leaving directory `/home/sand/.cpan/build/Time-Simple-
0.053- Show quoted text
> > uVlUfk' > >
> > This is probably caused by this change in perl5.10 in conjunction with > DST turned on/off: > > [ 30590] By: rgs on 2007/03/15
09:35:14 Show quoted text
> Log: Make the isdst argument to asctime and mktime default
to -1 Show quoted text
> instead of 0, as suggested by Mike Schilli. > Branch: perl > ! ext/POSIX/POSIX.pm ext/POSIX/POSIX.pod ext/POSIX/POSIX.xs
AFAIK the argument is always supplied, but I will get a Perl 5.10 and test. Ticket stalled until then. Show quoted text
> However, I took a look through the source code and found serious > problems. In many places localtime is used without a time argument
(e.g. Show quoted text
> (localtime)[4] etc.),
I could only see that in one place, _mktime_hms, which I have now updated. Show quoted text
> which means that a switch in any of the time > fields while processing the function would ruin the whole calculation.
Indeed - the the routine was entered on the cusp of a second. Not an error I have ever seen, but now covered, at least in the instance I found. Show quoted text
> Also, the dst calculation in _mktime_hms looks quite fragile.
How so? My limited understanding is the DST is either nil or +1 hour. I assumed Perl would return 1 or 0 from localtime, but perlfunc reads: $isdst is true if the specified time occurs during Daylight Saving Time, false otherwise. So I've adjusted accordingly: ($localtime[8]? 1 : 0) Show quoted text
> Maybe it > would be better to use gmtime instead of localtime thoughout > the module?
I don't think so, since that would break backwards compatibility. Instead, I will try to find and fix the bug the smoketests found. Thanks Lee
I think this is resolved, perhaps not gracefully, but will keep an eye on the smokehouse results as they come in.