Skip Menu |

This queue is for tickets about the Test-Mock-Wrapper CPAN distribution.

Report information
The Basics
Id: 112965
Status: resolved
Priority: 0/
Queue: Test-Mock-Wrapper

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

Bug Information
Severity: (no value)
Broken in: 0.17
Fixed in: 0.18



Subject: Tests fail (with perl 5.23.8 & hash randomization)
See http://matrix.cpantesters.org/?dist=Test-Mock-Wrapper%200.17;perl=5.23.8;reports=1#sl=7,1 for an overview of pass/fail reports for this distribution under perl 5.23.8. The pattern is random, and it seems that the problem is subject to perl's hash randomization. Tests seem to pass if PERL_HASH_SEED is set to 1 (for example), and fails with PERL_HASH_SEED=2.
I cannot confirm the observation with "pass if PERL_HASH_SEED is set to 1". I have seen PERL_HASH_SEED=1 to fail.
On 2016-03-13 06:23:04, ANDK wrote: Show quoted text
> I cannot confirm the observation with "pass if PERL_HASH_SEED is set > to 1". I have seen PERL_HASH_SEED=1 to fail.
It's somewhat confusing. The result depends whether tests are executed with "make test" or by using "perl5.23.8 -Mblib" or "prove5.23.8 -b". On my system these seem to always fail: env PERL_HASH_SEED=1 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/prove5.23.8 -b t/test_mock_wrap.t env PERL_HASH_SEED=2 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/prove5.23.8 -b t/test_mock_wrap.t env PERL_HASH_SEED=3 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/perl5.23.8 -Mblib t/test_mock_wrap.t env PERL_HASH_SEED=2 PERL_PERTURB_KEYS=NO make test And these seem to always pass: env PERL_HASH_SEED=3 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/prove5.23.8 -b t/test_mock_wrap.t env PERL_HASH_SEED=1 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/perl5.23.8 -Mblib t/test_mock_wrap.t env PERL_HASH_SEED=2 PERL_PERTURB_KEYS=NO /opt/perl-5.23.8/bin/perl5.23.8 -Mblib t/test_mock_wrap.t env PERL_HASH_SEED=1 PERL_PERTURB_KEYS=NO make test env PERL_HASH_SEED=3 PERL_PERTURB_KEYS=NO make test
And even fail with PERL_HASH_SEED=0. But I can confirm randomness plays a role. After I repeated the installation attempt often enough, at some point I got a success
Bleadperl v5.23.7-331-g000814d is the first that exhibits the random test results. Plausible in so far that it has to do with AUTOLOAD. See also https://rt.perl.org/rt3/Ticket/Display.html?id=127494 The random results continue to date with bleadperl. Latest bleadperl tested at the time of this writing: v5.23.8-153-g052efbb I have not yet seen a random result before v5.23.7-331-g000814d. The matrix http://matrix.cpantesters.org/?dist=Test-Mock-Wrapper%200.17 also has not seen a fail before 5.23.8.
Please note that Tony Cook argues over in https://rt.perl.org/Ticket/Display.html?id=127494 that the bug is in Test::Mock::Wrapped not handling DESTROY in AUTOLOAD.
As of 0.18 all tests pass. Thanks!