Subject: | >=5.17 Hash randomization breaks 02_load_credential.t |
Perl 5.17 has changes in it scheduled for 5.18 that mean hash-ordering is not consistent between runs any more.
Fixing the hash seed on a known good value gives repeatable good output, and likewise, fixing it on a known bad value gives repeatable bad output, which hints that this bug may be indirectly caused by it in some way.
I would have tried to explain what is going wrong in further detail, but I can't really understand why its failing either.
There seem to be 4 cases, 1 good, 3 bad, at least, running lots of times with PERL_HASH_SEED_DEBUG=1 only seemed to give me one of 4 outputs, and I found a short seed for each case I observed happening. There might be other cases, but these are the ones I've got, and I'm hoping it will be useful enough for you to diagnose what is going wrong.
PERL_HASH_SEED=0x1 prove -qlr t/02_load_credentials.t
t/02_load_credentials.t .. ok
All tests successful.
Files=1, Tests=6, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.06 cusr 0.00 csys = 0.07 CPU)
Result: PASS
t/02_load_credentials.t .. 1/?
# Failed test 'Get DB info from hashref.'
# at t/02_load_credentials.t line 110.
# Structures begin differing at:
# $got->{user} = 'YawnyPants'
# $expected->{user} = 'MyUser'
# Failed test 'Get DB info from array.'
# at t/02_load_credentials.t line 110.
# Structures begin differing at:
# $got->{user} = 'YawnyPants'
# $expected->{user} = 'MyUser'
# Looks like you failed 2 tests of 6.
t/02_load_credentials.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/6 subtests
Test Summary Report
-------------------
t/02_load_credentials.t (Wstat: 512 Tests: 6 Failed: 2)
Failed tests: 1-2
Non-zero exit status: 2
PERL_HASH_SEED=0x8 prove -qlr t/02_load_credentials.t
t/02_load_credentials.t .. 1/?
Show quoted text
# at t/02_load_credentials.t line 110.
# Structures begin differing at:
# $got->{pass} = 'WhyDoYouHateUs?'
# $expected->{pass} = 'MyPass'
# Failed test 'Get DB info from array.'
# at t/02_load_credentials.t line 110.
# Structures begin differing at:
# $got->{pass} = 'WhyDoYouHateUs?'
# $expected->{pass} = 'MyPass'
# Looks like you failed 2 tests of 6.
Failed 2/6 subtests