Bug#441746: libdata-random-perl: FTBFS if builed three times in a row
Damyan Ivanov
dam at modsoftsys.com
Tue Sep 11 08:36:49 UTC 2007
tags 441746 pending
retitle 441746 random FTBFS in test suite (t/rand_datetime)
thanks
-=| Patrick Winnertz, 11.09.2007 00:48 |=-
> make[1]: Entering directory `/build/user/libdata-random-perl-0.05'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/rand_chars.......ok
> t/rand_date........ok
> t/rand_datetime....
> # Failed test in t/rand_datetime.t at line 43.
> # Looks like you failed 1 test of 5.
> dubious
> Test returned status 1 (wstat 256, 0x100)
> DIED. FAILED test 1
> Failed 1/5 tests, 80.00% okay
Lucky you :)
This test fails randomly. Funny for a package dealing with randomness!
This is a problem with the tests. The following code is bad:
$pass = 0
unless $delta >= 0 && $delta <= $max_days
&& _to_secs( ( split ( / /, $date ) )[1] );
Thing is, that _to_secs is supposed to fetch the seconds since the
beginning of the day for the returned date and when this happens to be
zero (i.e., the returned random date is an exact one like "2007-01-01
00:00:00), fails.
The probability for this is >0 so the test is simply imperfect.
I'll make the dest use "defined(_to_secs(...))", similarly to
30rand_time.dpatch.
--
dam JabberID: dam at jabber.minus273.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20070911/7ed2edf2/attachment.pgp
More information about the pkg-perl-maintainers
mailing list