Skip Menu |

This queue is for tickets about the MarpaX-Languages-C-AST CPAN distribution.

Report information
The Basics
Id: 129997
Status: open
Priority: 0/
Queue: MarpaX-Languages-C-AST

People
Owner: Nobody in particular
Requestors: b3608017 [...] urhen.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.48
Fixed in: (no value)



Subject: MarpaX-Languages-C-AST-0.48 Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file
Hi, Its some kind of mystery :) MarpaX-Languages-C-AST-0.48 $ prove -b t/00-report-prereqs.t t/failure-function-definition-declaration-list-02.t t/failure-function-definition-decla ration-list.t t/failure-function-definition-declaration-specifiers-02.t t/failure-function-definition-declaration-specif iers.t t/failure-parameter-declaration-02.t t/failure-parameter-declaration.t t/syntax-error.t t/00-report-prereqs.t ...................................... # # Versions for all modules listed in MYMETA.json (including optional ones): # # === Configure Requires === # # Module Want Have # ----------------------- ---- ---- # ExtUtils::MakeMaker any 7.20 # File::ShareDir::Install 0.06 0.10 # # === Build Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker any 7.20 # # === Test Requires === # # Module Want Have # ------------------- ---- -------- # Clone any 0.34 # ExtUtils::MakeMaker any 7.20 # File::Spec any 3.62 # File::Temp any 0.2309 # IO::Handle any 1.33 # IPC::Open3 any 1.12 # Test::Differences any 0.61 # Test::More any 1.001014 # Test::Trap any 0.3.4 # # === Test Recommends === # # Module Want Have # ---------- -------- -------- # CPAN::Meta 2.120900 2.150005 # # === Runtime Requires === # # Module Want Have # ----------------- -------- ---------- # Carp any 1.26 # Class::Struct any 0.63 # Data::Dumper any 2.154 # Env any 1.04 # Exporter any 5.68 # File::Basename any 2.84 # File::Copy any 2.23 # File::Find any 1.20 # File::ShareDir any 1.03 # File::Slurp any 9999.19 # File::Spec any 3.62 # File::Temp any 0.2309 # Getopt::Long any 2.42 # IO::CaptureOutput any 1.1102 # IO::File any 1.16 # IO::Handle any 1.33 # IO::String any 1.08 # IPC::Cmd any 0.84 # IPC::Run any 0.92 # Log::Any any 0.14 # Log::Any::Adapter any 0.11 # Log::Log4perl any 1.49 # Marpa::R2 2.081001 3.000000 # POSIX any 1.30 # Pod::Usage any 1.64 # Regexp::Common any 2013031301 # SUPER any 1.20190531 # Scalar::Util any 1.44 # Term::ProgressBar any 2.13 # Try::Tiny any 0.18 # Unicode::CaseFold any 1.01 # Win32::ShellQuote > 0 0.003001 # XML::LibXML any 2.0121 # XML::LibXSLT any 1.79 # constant any 1.33 # diagnostics any 1.28 # filetest any 1.02 # parent any 0.228 # strict any 1.07 # warnings any 1.13 # t/00-report-prereqs.t ...................................... ok t/failure-function-definition-declaration-list-02.t ........ 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \TYdL7 1fVct: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-function-definition-declaration-list-02.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb930e4)', 'Test::Trap', 'GLOB(0xb4870c)', 'ARRAY(0xba52dc) ', 'CODE(0x33c5bec)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c5bec)') called at t/failure-function-definition-declaration-list-02.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-function-definition-declaration-list-02.t ........ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/failure-function-definition-declaration-list.t ........... 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \jyHb9 mOjBr: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-function-definition-declaration-list.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb930e4)', 'Test::Trap', 'GLOB(0xb4870c)', 'ARRAY(0xba52dc) ', 'CODE(0x33c6524)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c6524)') called at t/failure-function-definition-declaration-list.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-function-definition-declaration-list.t ........... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/failure-function-definition-declaration-specifiers-02.t .. 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \mHmpv vhR83: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-function-definition-declaration-specifiers-02.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb93314)', 'Test::Trap', 'GLOB(0xb48924)', 'ARRAY(0xbd94f4) ', 'CODE(0x33c538c)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c538c)') called at t/failure-function-definition-declaration-specifiers-02.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-function-definition-declaration-specifiers-02.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/failure-function-definition-declaration-specifiers.t ..... 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \ajtQq qcjF9: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-function-definition-declaration-specifiers.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb84f9c)', 'Test::Trap', 'GLOB(0xb48b54)', 'ARRAY(0xbd9674) ', 'CODE(0x33c58fc)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c58fc)') called at t/failure-function-definition-declaration-specifiers.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-function-definition-declaration-specifiers.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/failure-parameter-declaration-02.t ....................... 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \8FBoJ Ge7IL: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-parameter-declaration-02.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb9310c)', 'Test::Trap', 'GLOB(0xb48754)', 'ARRAY(0xba5224) ', 'CODE(0x33c4be4)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c4be4)') called at t/failure-parameter-declaration-02.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-parameter-declaration-02.t ....................... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/failure-parameter-declaration.t .......................... 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \ALHQk XdImG: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/failure-parameter-declaration.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb9308c)', 'Test::Trap', 'GLOB(0xb486fc)', 'ARRAY(0xba4644) ', 'CODE(0x33c3b1c)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c3b1c)') called at t/failure-parameter-declaration.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/failure-parameter-declaration.t .......................... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests t/syntax-error.t ........................................... 1/2 Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \7NLFw bIEBx: Permission denied at D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. at t/syntax-error.t line 15. Test::Trap::Builder::trap('Test::Trap::Builder=HASH(0xb93164)', 'Test::Trap', 'GLOB(0xb487c4)', 'ARRAY(0xba52cc) ', 'CODE(0x33c5b8c)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33c5b8c)') called at t/syntax-error.t line 15 # Looks like you planned 2 tests but ran 1. # Looks like your test exited with 255 just after 1. t/syntax-error.t ........................................... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests Test Summary Report ------------------- t/failure-function-definition-declaration-list-02.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/failure-function-definition-declaration-list.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/failure-function-definition-declaration-specifiers-02.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/failure-function-definition-declaration-specifiers.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/failure-parameter-declaration-02.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/failure-parameter-declaration.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. t/syntax-error.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. Files=8, Tests=8, 23 wallclock secs ( 0.14 usr + 0.02 sys = 0.16 CPU) Result: FAIL
On 2019-07-07 00:06:05, b3608017@urhen.com wrote: Show quoted text
> Hi, > Its some kind of mystery :)
It's not all that mysterious. At least not once you see it. ;) Show quoted text
> Uncaught exception from user code: > Rethrowing internal exception: Error in tempfile() using > template \XXXXXXXXXX: Could not create temp file \TYdL7 > 1fVct: Permission denied at
File::Temp is using File::Spec->tmpdir, which first tries to use the environment variables TMPDIR, TEMP, or TMP. When run with taint checking, those environment variables will be tainted, and so File::Spec won't find any directories as named by those variables. As a last resort, File::Spec->tmpdir returns "/", and the user running these tests lacks permission to create temp files in that directory. This is a long-standing issue with File::Temp. In the tests for Test::Trap, I work around it by blindly untainting these environment variables. Blindly should be fine during testing; no one will be testing Test::Trap in a hostile environment, right? If you feel the same way about testing MarpaX-Languages-C-AST, you could use the same workaround: : BEGIN { : $_ = defined && /(.*)/ && $1 for @ENV{qw/ TMPDIR TEMP TMP /}; # taint vs tempfile Alternatively, you could drop the taint check, at least on Windows (the defaults are usually good on other platforms I know). Unfortunately, conditionally dropping the taint check is not all that easy. I do it in other tests by building the tests from a .PL file; see https://metacpan.org/source/EBHANSSEN/Test-Trap-v0.3.4/t/08-fork.PL for a further complicated example. Or you know, just drop running the tests with taint checking entirely … A possible third option would be to use the perlio strategy instead of the default tempfile strategy: C<< use Test::Trap ':output(perlio)' >> throughout. Each strategy comes with its own shortcomings, but these days perlio is supported everywhere, so it should be good enough for you, assuming the (default) tempfile strategy is – which I haven't checked; see https://metacpan.org/pod/release/EBHANSSEN/Test-Trap-v0.3.4/lib/Test/Trap.pm#CAPTURE-STRATEGIES for more. Eirik -- Eirik Berg Hanssen, ebhanssen@cpan.org Just this .sig then nothing more