dagolden / HTTP-CookieJar

A minimalist HTTP user agent cookie jar
2 stars 7 forks source link

Tests fail for 32 bit perl 5.10 on RHEL5/6, work fine for 5.12 through 5.16, and 64 bit 5.10 #1

Closed wphillipmoore closed 11 years ago

wphillipmoore commented 11 years ago

I've encountered the following test failure for HTTP-CookieJar-0.001, but only for 32 bit perl 5.10. The tests work fine for 64 bit 5.10, and all builds (32/64) of 5.12 through 5.16.

This was built against completely uptodate CPAN dependencies, although the version reported for Test::Mock is odd. I have yet to look into that, but doubt it matters (watch me be wrong).

The tests output is below.

----snip---- [2013-03-07 02:05:10] System test command: cd /var/tmp/perl5-HTTP-CookieJar-0.001-build001-build/x86-32.rhel.6/5.10/source/HTTP-CookieJar-0.001\ && efsdeploy_perl_command test < /dev/null [2013-03-07 02:05:15] PERL_DLNONLAZY=1 /efs/dist/perl5/core/5.10.1-build100/.exec/x86-32.rhel.6/bin/perl "-MExtUtils::Command::MM" "-e" "test\ harness(0, 'blib/lib', 'blib/arch')" t/.t [2013-03-07 02:05:15] t/00-compile.t ......... ok [2013-03-07 02:05:15] # Prerequisite Report: [2013-03-07 02:05:15] # Version Module [2013-03-07 02:05:15] # ------- --------------------- [2013-03-07 02:05:15] # 1.26 Carp [2013-03-07 02:05:15] # 6.64 ExtUtils::MakeMaker [2013-03-07 02:05:15] # 1.14 File::Find [2013-03-07 02:05:15] # 3.40 File::Spec::Functions [2013-03-07 02:05:15] # 0.22 File::Temp [2013-03-07 02:05:15] # 6.02 HTTP::Date [2013-03-07 02:05:15] # 6.00 HTTP::Request [2013-03-07 02:05:15] # 6.04 HTTP::Response [2013-03-07 02:05:15] # 1.27 List::Util [2013-03-07 02:05:15] # v0.1.12 Mozilla::PublicSuffix [2013-03-07 02:05:15] # 0.110 Test::Deep [2013-03-07 02:05:15] # 0.98 Test::More [2013-03-07 02:05:15] # 0.06 Test::Requires [2013-03-07 02:05:15] # ^@^@^B Time::Mock [2013-03-07 02:05:15] # 1.60 URI [2013-03-07 02:05:15] # 0.225 parent [2013-03-07 02:05:15] # 1.04 strict [2013-03-07 02:05:15] # 1.06 warnings [2013-03-07 02:05:15] t/00-report-prereqs.t .. ok [2013-03-07 02:05:15] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.001-build001-build/x86-32.rhel.6/5.10/sourc\ e/HTTP-CookieJar-0.001/blib/lib/HTTP/CookieJar.pm line 158. [2013-03-07 02:05:15] t/add.t ................ ok [2013-03-07 02:05:15] t/examples.t ........... ok [2013-03-07 02:05:15] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.001-build001-build/x86-32.rhel.6/5.10/sourc\ e/HTTP-CookieJar-0.001/blib/lib/HTTP/CookieJar.pm line 158. [2013-03-07 02:05:15] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.001-build001-build/x86-32.rhel.6/5.10/sourc\ e/HTTP-CookieJar-0.001/blib/lib/HTTP/CookieJar.pm line 158. [2013-03-07 02:05:15] t/parse.t .............. ok [2013-03-07 02:05:15] t/publicsuffix.t ....... ok [2013-03-07 02:05:15] t/save.t ............... ok [2013-03-07 02:05:15] t/sort.t ............... ok [2013-03-07 02:05:15] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.001-build001-build/x86-32.rhel.6/5.10/sourc\ e/HTTP-CookieJar-0.001/blib/lib/HTTP/CookieJar.pm line 158. [2013-03-07 02:05:15] [2013-03-07 02:05:15] # Failed test 'far future and past' [2013-03-07 02:05:15] # at t/zzz-lwp.t line 624. [2013-03-07 02:05:15] # got: '' [2013-03-07 02:05:15] # expected: 'PREF=ID=cee18f7c4e977184:TM=1254583090:LM=1254583090:S=Pdb0-hy9PxrNj4LL' [2013-03-07 02:05:15] # bless( { [2013-03-07 02:05:15] # 'store' => { [2013-03-07 02:05:15] # 'example.com' => { [2013-03-07 02:05:15] # '/' => {} [2013-03-07 02:05:15] # } [2013-03-07 02:05:15] # } [2013-03-07 02:05:15] # }, 'HTTP::CookieJar::LWP' ) [2013-03-07 02:05:15] # Looks like you failed 1 test of 46. [2013-03-07 02:05:15] t/zzz-lwp.t ............ [2013-03-07 02:05:15] Dubious, test returned 1 (wstat 256, 0x100) [2013-03-07 02:05:15] Failed 1/46 subtests [2013-03-07 02:05:15] Test Summary Report [2013-03-07 02:05:15] ------------------- [2013-03-07 02:05:15] t/zzz-lwp.t (Wstat: 256 Tests: 46 Failed: 1) [2013-03-07 02:05:15] Failed test: 45 [2013-03-07 02:05:15] Non-zero exit status: 1 [2013-03-07 02:05:15] Files=9, Tests=92, 2 wallclock secs ( 0.05 usr 0.02 sys + 0.82 cusr 0.23 csys = 1.12 CPU) [2013-03-07 02:05:15] Result: FAIL [2013-03-07 02:05:15] Failed 1/9 test programs. 1/92 subtests failed. [2013-03-07 02:05:15] make: ** [test_dynamic] Error 1 [2013-03-07 02:05:15] ^[[31mCommand test failed^[[0m ----snip----

dagolden commented 11 years ago

Thanks. It seems to be a Y2038 issue with HTTP::Date. I'll dig into it further and fix.

dagolden commented 11 years ago

HTTP::Date needs a newer Time::Local, so I set that prereq myself now. Shipped 0.002.

wphillipmoore commented 11 years ago

I'm still seeing the same error with 0.002, unfortunately. Here's the snippet of one of the test logs:

[2013-03-07 15:53:29] System test command: cd /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/source/HTTP-CookieJar-0.002\ && efsdeploy_perl_command test < /dev/null [2013-03-07 15:53:36] PERL_DLNONLAZY=1 /efs/dist/perl5/core/5.10.1-build100/.exec/x86-32.rhel.5/bin/perl "-MExtUtils::Command::MM" "-e" "test\ harness(0, 'blib/lib', 'blib/arch')" t/.t [2013-03-07 15:53:36] t/00-compile.t ......... ok [2013-03-07 15:53:36] # Prerequisite Report: [2013-03-07 15:53:36] # Version Module [2013-03-07 15:53:36] # ------- --------------------- [2013-03-07 15:53:36] # 1.26 Carp [2013-03-07 15:53:36] # 6.64 ExtUtils::MakeMaker [2013-03-07 15:53:36] # 1.14 File::Find [2013-03-07 15:53:36] # 3.40 File::Spec::Functions [2013-03-07 15:53:36] # 0.22 File::Temp [2013-03-07 15:53:36] # 6.02 HTTP::Date [2013-03-07 15:53:36] # 6.00 HTTP::Request [2013-03-07 15:53:36] # 6.04 HTTP::Response [2013-03-07 15:53:36] # 1.27 List::Util [2013-03-07 15:53:36] # v0.1.13 Mozilla::PublicSuffix [2013-03-07 15:53:36] # 0.110 Test::Deep [2013-03-07 15:53:36] # 0.98 Test::More [2013-03-07 15:53:36] # 0.06 Test::Requires [2013-03-07 15:53:36] # 1.1901 Time::Local [2013-03-07 15:53:36] # ^@^@^B Time::Mock [2013-03-07 15:53:36] # 1.60 URI [2013-03-07 15:53:36] # 0.225 parent [2013-03-07 15:53:36] # 1.04 strict [2013-03-07 15:53:36] # 1.06 warnings [2013-03-07 15:53:36] t/00-report-prereqs.t .. ok [2013-03-07 15:53:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 15:53:36] t/add.t ................ ok [2013-03-07 15:53:36] t/examples.t ........... ok [2013-03-07 15:53:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 15:53:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 15:53:36] t/parse.t .............. ok [2013-03-07 15:53:36] t/publicsuffix.t ....... ok [2013-03-07 15:53:36] t/save.t ............... ok [2013-03-07 15:53:36] t/sort.t ............... ok [2013-03-07 15:53:36] [2013-03-07 15:53:36] # Failed test 'far future and past' [2013-03-07 15:53:36] # at t/zzz-lwp.t line 624. [2013-03-07 15:53:36] # got: '' [2013-03-07 15:53:36] # expected: 'PREF=ID=cee18f7c4e977184:TM=1254583090:LM=1254583090:S=Pdb0-hy9PxrNj4LL' [2013-03-07 15:53:36] # bless( { [2013-03-07 15:53:36] # 'store' => { [2013-03-07 15:53:36] # 'example.com' => { [2013-03-07 15:53:36] # '/' => {} [2013-03-07 15:53:36] # } [2013-03-07 15:53:36] # } [2013-03-07 15:53:36] # }, 'HTTP::CookieJar::LWP' ) [2013-03-07 15:53:36] # Looks like you failed 1 test of 46. [2013-03-07 15:53:36] t/zzz-lwp.t ............ [2013-03-07 15:53:36] Dubious, test returned 1 (wstat 256, 0x100) [2013-03-07 15:53:36] Failed 1/46 subtests [2013-03-07 15:53:36] [2013-03-07 15:53:36] Test Summary Report [2013-03-07 15:53:36] ------------------- [2013-03-07 15:53:36] t/zzz-lwp.t (Wstat: 256 Tests: 46 Failed: 1) [2013-03-07 15:53:36] Failed test: 45 [2013-03-07 15:53:36] Non-zero exit status: 1 [2013-03-07 15:53:36] Files=9, Tests=92, 4 wallclock secs ( 0.07 usr 0.02 sys + 0.83 cusr 0.39 csys = 1.31 CPU) [2013-03-07 15:53:36] Result: FAIL [2013-03-07 15:53:36] Failed 1/9 test programs. 1/92 subtests failed. [2013-03-07 15:53:36] make: ** [test_dynamic] Error 1 [2013-03-07 15:53:36] ^[[31mCommand test failed^[[0m

On Thu, Mar 7, 2013 at 6:12 AM, David Golden notifications@github.comwrote:

HTTP::Date needs a newer Time::Local, so I set that prereq myself now. Shipped 0.002.

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/1#issuecomment-14554333 .

dagolden commented 11 years ago

Annoying.

Does it go away with a newer Time::Local? e.g. 1.20?

David

wphillipmoore commented 11 years ago

Hmm -- I have the latest Time-Local in my tree, but for some reason, I'm not picking it up.

Must be a bug in my build system. I'll track that down, and then let you know what the results are when it runs with the latest Time::Local.

Stay tuned....

On Thu, Mar 7, 2013 at 12:36 PM, David Golden notifications@github.comwrote:

Annoying.

Does it go away with a newer Time::Local? e.g. 1.20?

David

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/1#issuecomment-14574686 .

wphillipmoore commented 11 years ago

OK, here's why I'm not picking it up.

perl5.10 has Time::Local 1.9201, but that's the one you say you require!! My code has some perverse logic for deciding when to use the core, and when to use CPAN, for the most part making the obvious version comparisons to decide. However, all things equal, if the core satisfies a given dependency, I let the core satisfy it.

So, in this case, what's odd is that I am NOT trying to use the installation of Time-Local 1.2300 that I have, it's just using the Time::Local in the perl5.10 core.

If you had defined the dependency on 1.20, then my build system would have built it against the 1.2300 I have.

So... I need to rethink the logic in my code, and consider preferring the CPAN distro, especially if the damn thing's already there. I also notice, upon reviewing the code, that I am being very careful to deal with a VERY rare circumstance -- something getting added to the core, and then being left to rot on CPAN. I do not recall which module gave me this headache, but I've coded against it.

On Thu, Mar 7, 2013 at 3:05 PM, Phillip Moore w.phillip.moore@gmail.comwrote:

Hmm -- I have the latest Time-Local in my tree, but for some reason, I'm not picking it up.

Must be a bug in my build system. I'll track that down, and then let you know what the results are when it runs with the latest Time::Local.

Stay tuned....

On Thu, Mar 7, 2013 at 12:36 PM, David Golden notifications@github.comwrote:

Annoying.

Does it go away with a newer Time::Local? e.g. 1.20?

David

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/1#issuecomment-14574686 .

wphillipmoore commented 11 years ago

Now I'm running against 1.2300 and I still get the same result:

[2013-03-07 20:58:36] PERL_DLNONLAZY=1 /efs/dist/perl5/core/5.10.1-build100/.exec/x86-32.rhel.5/bin/perl "-MExtUtils::Command::MM" "-e" "test\ harness(0, 'blib/lib', 'blib/arch')" t/.t [2013-03-07 20:58:36] t/00-compile.t ......... ok [2013-03-07 20:58:36] # Prerequisite Report: [2013-03-07 20:58:36] # Version Module [2013-03-07 20:58:36] # ------- --------------------- [2013-03-07 20:58:36] # 1.26 Carp [2013-03-07 20:58:36] # 6.64 ExtUtils::MakeMaker [2013-03-07 20:58:36] # 1.14 File::Find [2013-03-07 20:58:36] # 3.40 File::Spec::Functions [2013-03-07 20:58:36] # 0.22 File::Temp [2013-03-07 20:58:36] # 6.02 HTTP::Date [2013-03-07 20:58:36] # 6.00 HTTP::Request [2013-03-07 20:58:36] # 6.04 HTTP::Response [2013-03-07 20:58:36] # 1.27 List::Util [2013-03-07 20:58:36] # v0.1.13 Mozilla::PublicSuffix [2013-03-07 20:58:36] # 0.110 Test::Deep [2013-03-07 20:58:36] # 0.98 Test::More [2013-03-07 20:58:36] # 0.06 Test::Requires [2013-03-07 20:58:36] # 1.2300 Time::Local [2013-03-07 20:58:36] # ^@^@^B Time::Mock [2013-03-07 20:58:36] # 1.60 URI [2013-03-07 20:58:36] # 0.225 parent [2013-03-07 20:58:36] # 1.04 strict [2013-03-07 20:58:36] # 1.06 warnings [2013-03-07 20:58:36] t/00-report-prereqs.t .. ok [2013-03-07 20:58:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 20:58:36] t/add.t ................ ok [2013-03-07 20:58:36] t/examples.t ........... ok [2013-03-07 20:58:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 20:58:36] Use of uninitialized value $name in length at /var/tmp/perl5-HTTP-CookieJar-0.002-build001-build/x86-32.rhel.5/5.10/sourc\ e/HTTP-CookieJar-0.002/blib/lib/HTTP/CookieJar.pm line 159. [2013-03-07 20:58:36] t/parse.t .............. ok [2013-03-07 20:58:36] t/publicsuffix.t ....... ok [2013-03-07 20:58:36] t/save.t ............... ok [2013-03-07 20:58:36] t/sort.t ............... ok [2013-03-07 20:58:36] [2013-03-07 20:58:36] # Failed test 'far future and past' [2013-03-07 20:58:36] # at t/zzz-lwp.t line 624. [2013-03-07 20:58:36] # got: '' [2013-03-07 20:58:36] # expected: 'PREF=ID=cee18f7c4e977184:TM=1254583090:LM=1254583090:S=Pdb0-hy9PxrNj4LL' [2013-03-07 20:58:36] # bless( { [2013-03-07 20:58:36] # 'store' => { [2013-03-07 20:58:36] # 'example.com' => { [2013-03-07 20:58:36] # '/' => {} [2013-03-07 20:58:36] # } [2013-03-07 20:58:36] # } [2013-03-07 20:58:36] # }, 'HTTP::CookieJar::LWP' ) [2013-03-07 20:58:36] # Looks like you failed 1 test of 46. [2013-03-07 20:58:36] t/zzz-lwp.t ............ [2013-03-07 20:58:36] Dubious, test returned 1 (wstat 256, 0x100) [2013-03-07 20:58:36] Failed 1/46 subtests [2013-03-07 20:58:36] [2013-03-07 20:58:36] Test Summary Report [2013-03-07 20:58:36] ------------------- [2013-03-07 20:58:36] t/zzz-lwp.t (Wstat: 256 Tests: 46 Failed: 1) [2013-03-07 20:58:36] Failed test: 45 [2013-03-07 20:58:36] Non-zero exit status: 1 [2013-03-07 20:58:36] Files=9, Tests=92, 3 wallclock secs ( 0.02 usr 0.03 sys + 0.89 cusr 0.25 csys = 1.19 CPU) [2013-03-07 20:58:36] Result: FAIL [2013-03-07 20:58:36] Failed 1/9 test programs. 1/92 subtests failed. [2013-03-07 20:58:36] make: ** [test_dynamic] Error 1 [2013-03-07 20:58:36] ^[[31mCommand test failed^[[0m

On Thu, Mar 7, 2013 at 3:24 PM, Phillip Moore w.phillip.moore@gmail.comwrote:

OK, here's why I'm not picking it up.

perl5.10 has Time::Local 1.9201, but that's the one you say you require!! My code has some perverse logic for deciding when to use the core, and when to use CPAN, for the most part making the obvious version comparisons to decide. However, all things equal, if the core satisfies a given dependency, I let the core satisfy it.

So, in this case, what's odd is that I am NOT trying to use the installation of Time-Local 1.2300 that I have, it's just using the Time::Local in the perl5.10 core.

If you had defined the dependency on 1.20, then my build system would have built it against the 1.2300 I have.

So... I need to rethink the logic in my code, and consider preferring the CPAN distro, especially if the damn thing's already there. I also notice, upon reviewing the code, that I am being very careful to deal with a VERY rare circumstance -- something getting added to the core, and then being left to rot on CPAN. I do not recall which module gave me this headache, but I've coded against it.

On Thu, Mar 7, 2013 at 3:05 PM, Phillip Moore w.phillip.moore@gmail.comwrote:

Hmm -- I have the latest Time-Local in my tree, but for some reason, I'm not picking it up.

Must be a bug in my build system. I'll track that down, and then let you know what the results are when it runs with the latest Time::Local.

Stay tuned....

On Thu, Mar 7, 2013 at 12:36 PM, David Golden notifications@github.comwrote:

Annoying.

Does it go away with a newer Time::Local? e.g. 1.20?

David

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/1#issuecomment-14574686 .

dagolden commented 11 years ago

Thanks for all the iterative builds. Time::Local purported to fix things on 32-bit, but I guess not.

I'll have to build up some 32-bit perls and see if I can replicate it.

The cheater way out would be to use a year before 2038, but it would be nice to actually know the code is 2038 safe.

David

wphillipmoore commented 11 years ago

Man, talking about forward thinking.... :-)

For now, I'll force install it (i.e. ignore the errors), but if you have something else you want me to test, let me know. I can reproduce this anytime, and I'm happy to do so for you.

On Thu, Mar 7, 2013 at 4:10 PM, David Golden notifications@github.comwrote:

Thanks for all the iterative builds. Time::Local purported to fix things on 32-bit, but I guess not.

I'll have to build up some 32-bit perls and see if I can replicate it.

The cheater way out would be to use a year before 2038, but it would be nice to actually know the code is 2038 safe.

David

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/1#issuecomment-14586334 .

dagolden commented 11 years ago

I dug around and gave up. Time::Local is just sort of broken, and HTTP::Date hides too much of the result to monkey patch. I'd have to reimplement HTTP::Date to fix it. Instead, I've just release 0.003 with a test file that hopefully detects Time::Local problems and uses 2037 as a future year. Oh, well.