Skip Menu |
 

This queue is for tickets about the Statistics-Shannon CPAN distribution.

Report information
The Basics
Id: 112964
Status: open
Priority: 0/
Queue: Statistics-Shannon

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: (no value)



Subject: t/01base.t may fail (-Duselongdouble && hash randomization)
Download (untitled) / with headers
text/plain 353b
If perl is compiled with -Duselongdouble, then t/01base.t may fail randomly, probably due to hash randomization. At least if I run for i in $(seq 100); do echo -n "$i "; env PERL_HASH_SEED=$i PERL_PERTURB_KEYS=NO /opt/perl-5.20.1D/bin/prove -b t/01base.t >&/dev/null && echo pass || echo fail; done twice, then the same fail/pass pattern happens.
Download (untitled) / with headers
text/plain 884b
On Sat Mar 12 16:56:37 2016, SREZIC wrote: Show quoted text
> If perl is compiled with -Duselongdouble, then t/01base.t may fail > randomly, probably due to hash randomization. At least if I run > > for i in $(seq 100); do echo -n "$i "; env PERL_HASH_SEED=$i > PERL_PERTURB_KEYS=NO /opt/perl-5.20.1D/bin/prove -b t/01base.t
> >&/dev/null && echo pass || echo fail; done
> > twice, then the same fail/pass pattern happens.
Thanks for your report, but I cannot repro this in OS X with a -Duselongdouble Perl. Looking at the code I do not see how hash ordering could affect the result. The key is the index() sub, and while it does do 'keys' (without sorting) and 'values', I off-hand cannot see that this should matter, because what it does is sums. And furthermore, I don't see how longdouble or not should make a difference for (just) the base01.t failing. Could you debug a little bit more?
Correction: now I was able to repro it. Stay tuned.
Download (untitled) / with headers
text/plain 345b
On Sun Mar 13 11:10:24 2016, JHI wrote: Show quoted text
> Correction: now I was able to repro it. Stay tuned.
The test was expecting floating point equivalence, which in itself is a bad expectation, but what broke it was a bit more interesting: because of long doubles the summation order mattered, and the hash randomization affected the summation order.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.