Perl5-Alien / Alien-Base

Base classes for Alien:: modules (deprecated, see Alien-Build)
Other
35 stars 19 forks source link

Test suite creates temp files with fixed path #167

Closed dcollinsn closed 7 years ago

dcollinsn commented 7 years ago

Hello,

Your build process or test suite creates the following files, perhaps among others:

-rw-r--r-- 1 cpan2 cpan2 222 Sep 30 08:03 /tmp/env.csh -rw-r--r-- 1 cpan2 cpan2 237 Sep 30 08:03 /tmp/env.sh

If another user on the same computer then attempts to install your module, they will get the following failure:

Running Build test

perl 5.025006

Acme::Alien::DontPanic undefined

Acme::Ford::Prefect undefined

Acme::Ford::Prefect::FFI undefined

Archive::Extract 0.78

Capture::Tiny 0.44

Cwd 3.62

File::ShareDir 1.102

File::Spec 3.62

File::Temp 0.2304

File::chdir 0.1010

FindBin 1.51

HTML::LinkExtor 3.69

HTTP::Tiny 0.068

Inline 0.80

Inline::C undefined

Inline::CPP undefined

List::MoreUtils 0.416

Module::Build 0.422

Perl::OSType 1.010

Shell::Config::Generate 0.25

Shell::Guess 0.06

Sort::Versions 1.62

Test::Alien undefined

Test::CChecker 0.08

Test::More 1.302059

Text::ParseWords 3.30

URI 1.71

parent 0.234

t/00_diag.t ......................... ok t/alien_base.t ...................... ok t/build_flags.t ..................... ok

Looks like you planned 0 tests but ran 1.

cannot open env.sh: Permission denied at /home/cpan3/install/lib/perl5/site_perl/5.25.6/Shell/Config/Generate.pm line 364.

Tests were run but no plan was declared and done_testing() was not seen.

Looks like your test exited with 255 just after 9.

t/builder.t ......................... Dubious, test returned 255 (wstat 65280, 0xff00) All 9 subtests passed t/cabinet.t ......................... ok t/file.t ............................ ok t/find_lib.t ........................ ok t/http.t ............................ ok t/http_uri.t ........................ ok t/inline.t .......................... skipped: test requires Inline 0.56 and Inline::C t/inline_cpp.t ...................... skipped: test requires Inline 0.56 and Inline::CPP t/install_destination.t ............. ok t/interpolate.t ..................... ok t/local_repo.t ...................... ok t/pkgconfig.t ....................... ok t/repository.t ...................... ok t/repository_content_disposition.t .. ok t/utils.t ........................... ok t/validation.t ...................... ok t/version.t ......................... ok t/yy-system_installed.t ............. skipped: Could not find a suitable library for testing

Test Summary Report

t/builder.t (Wstat: 65280 Tests: 9 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=21, Tests=126, 12 wallclock secs ( 0.14 usr 0.01 sys + 10.69 cusr 0.95 csys = 11.79 CPU) Result: FAIL Failed 1/21 test programs. 0/126 subtests failed. (./Build test exited with 65280) CPAN::Reporter: Test result is 'fail', One or more tests failed. CPAN::Reporter: preparing a CPAN Testers report for Alien-Base-0.029

Please consider using File::Temp or similar to avoid this issue.

plicease commented 7 years ago

Thank you for reporting this. We are actually using File::Temp, but the code is also using some relative directories, so a couple of files escaped into /tmp as you noted. I believe this to be fixed with the above commit.