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

Detect failed open3 from Test::Harness #78

Open
xdg opened this issue Jul 10, 2016 · 0 comments
Open

Detect failed open3 from Test::Harness #78

xdg opened this issue Jul 10, 2016 · 0 comments

Comments

@xdg
Copy link
Contributor

xdg commented Jul 10, 2016

From a cpantesters-discuss mailing list thread:

Here's another odd failure:

http://www.cpantesters.org/cpan/report/cd9352da-4607-11e6-9fc5-14bfbd15da07

Output from '/usr/bin/make test':

PERL_DL_NONLAZY=1 "/home/njh/perl5/perlbrew/perls/perl-5.18.0/bin/perl"
"-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef
Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/.t
Could not execute (/home/njh/perl5/perlbrew/perls/perl-5.18.0/bin/perl
t/recurse.t): open3: exec of
/home/njh/perl5/perlbrew/perls/perl-5.18.0/bin/perl t/recurse.t failed at
/home/njh/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/TAP/Parser/Iterator/Process.pm
line 165.
Makefile:899: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 7

Unfortunately the 5.18.0 version of IPC::Open3 does not output the value
of $! in case of an exec failure (see
https://metacpan.org/source/RJBS/perl-5.18.0/ext/IPC-Open3/lib/IPC/Open3.pm#L277
).

I've seen similar errors where the $! value was "Argument list too
long". This usually happens if PERL5LIB is too long and exceeds the
environment's maximum length. However, on current Unix systems this is
typically more than 100kB, and PERL5LIB in the problematic report is far
fom this limit.

If this is widespread/common/random, I wonder if CPAN::Reporter et al. need
to try to detect this error and not send a report.

I do this (sort of) in my smoker wrapper: if a test report matches

m{Could not execute .* open3: exec of .* failed: Argument list too long at .*TAP/Parser/Iterator/Process.pm}

then it will not be sent to metabase.

Possibly the same approach could go into CPAN::Reporter, though without requiring "argument list too long" specifically. Any "open" failure in TAP::Parser::Iterator::Process is likely a failure unrelated to the distribution.

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

No branches or pull requests

1 participant