Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite fails on alpine linux #103

Closed
ncopa opened this issue Jul 30, 2020 · 9 comments · Fixed by libwww-perl/WWW-Mechanize-Cached#24
Closed

testsuite fails on alpine linux #103

ncopa opened this issue Jul 30, 2020 · 9 comments · Fixed by libwww-perl/WWW-Mechanize-Cached#24

Comments

@ncopa
Copy link

ncopa commented Jul 30, 2020

I suspect some of the dependencies was updated and introduces a regression, but I don't know which or how to fix this.

PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/api/*.t
# 
# Versions for all modules listed in MYMETA.json (including optional ones):
# 
# === Configure Requires ===
# 
#     Module                Want Have
#     ------------------- ------ ----
#     ExtUtils::MakeMaker 7.1101 7.34
# 
# === Build Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.34
# 
# === Test Requires ===
# 
#     Module                   Want     Have
#     -------------------- -------- --------
#     ExtUtils::MakeMaker       any     7.34
#     File::Spec                any     3.78
#     LWP::Protocol::https      any     6.07
#     Test::Fatal               any    0.014
#     Test::More                any 1.302162
#     Test::Needs          0.002005 0.002006
#     base                      any     2.27
#     blib                     1.01     1.07
# 
# === Test Recommends ===
# 
#     Module                     Want     Have
#     ---------------------- -------- --------
#     CPAN::Meta             2.120900 2.150010
#     HTTP::Tiny::Mech       1.001002 1.001002
#     WWW::Mechanize::Cached     1.50     1.53
# 
# === Runtime Requires ===
# 
#     Module           Want     Have
#     --------------- ----- --------
#     Carp              any     1.50
#     HTTP::Tiny      0.056    0.076
#     IO::Socket::SSL  1.42    2.068
#     JSON::MaybeXS     any 1.004002
#     JSON::PP          any     4.02
#     Moo               any 2.004000
#     Moo::Role         any 2.004000
#     Net::SSLeay      1.49     1.88
#     Ref::Util         any    0.204
#     Safe::Isa         any 1.000010
#     Type::Tiny        any 1.010002
#     URI::Escape       any     3.31
#     strict            any     1.11
#     warnings          any     1.44
# 
t/00-report-prereqs.t ......... ok
t/api/_get.t .................. ok
t/api/_get_or_search.t ........ ok
t/api/_search.t ............... ok
t/api/author.t ................ ok
t/api/cover.t ................. ok
t/api/distribution.t .......... ok
t/api/download_url.t .......... ok
t/api/favorite.t .............. ok
t/api/file.t .................. ok
t/api/module.t ................ ok
t/api/package.t ............... ok
t/api/permission.t ............ ok
t/api/pod.t ................... ok
t/api/rating.t ................ ok
t/api/release.t ............... ok
t/api/reverse-dependencies.t .. ok
t/entity.t .................... ok
t/request.t ................... ok
t/result_custom.t ............. ok
t/resultset.t ................. ok
t/scroll.t .................... ok
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/core_perl/HTTP/Tiny.pm line 602.

#   Failed test 'No illegal methods called'
#   at t/ua_trap.t line 45.
#          got: 'Can't use string ("chunked") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/vendor_perl/WWW/Mechanize/Cached.pm line 193.
# '
#     expected: undef
# Can't use string ("chunked") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/vendor_perl/WWW/Mechanize/Cached.pm line 193.
# Looks like you failed 1 test of 1.
t/ua_trap.t ................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Test Summary Report
-------------------
t/ua_trap.t                 (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=23, Tests=262, 14 wallclock secs ( 0.15 usr  0.02 sys +  7.04 cusr  0.76 csys =  7.97 CPU)
Result: FAIL
Failed 1/23 test programs. 1/262 subtests failed.
make: *** [Makefile:968: test_dynamic] Error 1

Recent changes of dependencies in Alpine that may have introduced this:

@oalders
Copy link
Member

oalders commented Jul 30, 2020

Thanks, @ncopa! I'm not all too familiar with Alpine. If I wanted to add a GitHub workflow that tested this on Alpine using Docker images, what would be the easiest way for me to replicate the above?

@oalders
Copy link
Member

oalders commented Jul 30, 2020

Am adding workflows in #104. That may help find the issue.

@oalders
Copy link
Member

oalders commented Jul 30, 2020

Looks like this is not specific to Alpine at all.

@oalders
Copy link
Member

oalders commented Jul 31, 2020

Seems to be here: https://metacpan.org/source/OALDERS/WWW-Mechanize-Cached-1.53/lib/WWW/Mechanize/Cached.pm#L193

It's expecting the header to be an arrayref and it chokes when there's a scalar.

@ncopa
Copy link
Author

ncopa commented Aug 7, 2020

So the problem is in WWW-Mechanize-Cached and should be fixed there?

@oalders
Copy link
Member

oalders commented Aug 7, 2020

Yes. I may get a fix in there today.

@timlegge
Copy link

timlegge commented Aug 7, 2020

@ncopa Tested successfully against MetaCPAN-Client-2.026000 on Alpine linux

Still has an issue with HTTP::Tiny: but the test succeeds so it appears to be expected

t/ua_trap.t ................... Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/core_perl/HTTP/Tiny.pm line 602.
t/ua_trap.t ................... ok

@oalders
Copy link
Member

oalders commented Aug 7, 2020

Thanks @timlegge. I have opened this issue with HTTP::Tiny: chansen/p5-http-tiny#137. I can fix it on this end as well.

So, I need to release a new WWW::Mechanize::Cached and then fix the undef warning here, bump the version of WWW::Mechanize::Cached and then release a new MetaCPAN::Client. :)

@oalders
Copy link
Member

oalders commented Aug 10, 2020

I've uploaded a new MetaCPAN::Client to CPAN. Let me know if you still have any issues. Thanks @ncopa and @timlegge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants