This queue is for tickets about the PHP-HTTPBuildQuery CPAN distribution.

Report information
The Basics
Id:
89278
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
gabor [...] szabgab.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: test failure in 0.07
Date: Sun, 6 Oct 2013 15:58:24 +0200
To: bug-PHP-HTTPBuildQuery@rt.cpan.org
From: Gabor Szabo <gabor@szabgab.com>
this is on 5.18.1 on OSX CPAN.pm: Building M/MS/MSCHILLI/PHP-HTTPBuildQuery-0.07.tar.gz Checking if your kit is complete... Looks good Writing Makefile for PHP::HTTPBuildQuery Writing MYMETA.yml and MYMETA.json cp HTTPBuildQuery.pm blib/lib/PHP/HTTPBuildQuery.pm Manifying blib/man3/PHP::HTTPBuildQuery.3 MSCHILLI/PHP-HTTPBuildQuery-0.07.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /opt/perl-5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/001Basic.t .. 1/14 # Failed test 'nested struct' # at t/001Basic.t line 80. # got: 'a=b&c%5Bd%5D=e' # expected: 'c%5Bd%5D=e&a=b' # Looks like you failed 1 test of 14. t/001Basic.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/14 subtests Test Summary Report ------------------- t/001Basic.t (Wstat: 256 Tests: 14 Failed: 1) Failed test: 11 Non-zero exit status: 1 Files=1, Tests=14, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr 0.01 csys = 0.08 CPU) Result: FAIL Failed 1/1 test programs. 1/14 subtests failed. make: *** [test_dynamic] Error 1
On Sun Oct 06 09:58:37 2013, gabor@szabgab.com wrote:
Show quoted text
> this is on 5.18.1 on OSX
Seems to work fine with 5.18.2 on OSX, is it possible that 5.18.1 is simply broken in terms of the has key order controlled by the PERL_PERTURB_KEYS Env variable?
From: dsteinbrunner@pobox.com
On Mon Oct 07 23:01:00 2013, MSCHILLI wrote:
Show quoted text
> On Sun Oct 06 09:58:37 2013, gabor@szabgab.com wrote:
> > this is on 5.18.1 on OSX
> > Seems to work fine with 5.18.2 on OSX, is it possible that 5.18.1 is > simply broken in terms of the has key order controlled by the > PERL_PERTURB_KEYS Env variable?
5.18.1 on OSX here also. I would test with 5.18.2 but it has not been released. The failure also happens with 5.19.6. I'm assuming this is a hash randomization support issue since tests do not fail on 5.16.3.
This is obviously a hash randomization issue. (1) the type of error messages shows that something hashy comes with correct values but different ordering, as in # got: 'foo=bar&me=you&baz=quack' # expected: 'baz=quack&me=you&foo=bar' found in http://www.cpantesters.org/cpan/report/72bb5040-8c02-11e3-84c5-805c5d7e0655 (2) the rad area in the matrix starts above 5.17.5. 5.17.5 was the last perl without hash randomization. Regards from Perlin' Berlin
On Sun Feb 09 10:52:13 2014, ANDK wrote:
Show quoted text
> This is obviously a hash randomization issue.
Yeah, this has been going on for a while, and it would be easy to "fix" on my end by sorting, but I'd rather not mask the underlying problem, the fact that apparently the perl core's PERL_PERTURB_KEYS variable isn't working as advertised. Here's a bit more history on the problem: https://github.com/mschilli/php-httpbuildquery-perl/pull/3 Would be great if you could bring it up with the p5p folks, I'm almost 100% sure it's a fix that needs to go into the perl core.
On 2014-02-10 02:53:18, MSCHILLI wrote:
Show quoted text
> On Sun Feb 09 10:52:13 2014, ANDK wrote:
> > This is obviously a hash randomization issue.
> > Yeah, this has been going on for a while, and it would be easy to > "fix" on my end by sorting, but I'd rather not mask the underlying > problem, the fact that apparently the perl core's PERL_PERTURB_KEYS > variable isn't working as advertised. > > Here's a bit more history on the problem: > > https://github.com/mschilli/php-httpbuildquery-perl/pull/3 > > Would be great if you could bring it up with the p5p folks, I'm almost > 100% sure it's a fix that needs to go into the perl core.
A little bit experimenting seems to show the following: - Setting these environment variables is too late. You have to set it before the interpreter starts. So in your specific case, you probably need a wrapper test script which is setting the environment variables and calls the actual test script - You have also to set PERL_HASH_SEED, e.g. to 0 - And if you finally set PERL_PERTURB_KEYS to "NO", then the test suite works with 5.18.x and 5.20.x Regards, Slaven
On Sat Jun 14 09:36:22 2014, SREZIC wrote:
Show quoted text
> - You have also to set PERL_HASH_SEED, e.g. to 0 > > - And if you finally set PERL_PERTURB_KEYS to "NO", then the test
Thanks for the instructions, I've applied them and released 0.08 to CPAN, let's see if it's working now: https://github.com/mschilli/php-httpbuildquery-perl/commit/9377a9c24f05e58d872523ed7f1b990185655edc


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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