Skip Menu |

This queue is for tickets about the Test-Trap CPAN distribution.

Report information
The Basics
Id: 129996
Status: open
Priority: 0/
Queue: Test-Trap

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

Bug Information
Severity: (no value)
Broken in: v0.3.4
Fixed in: (no value)



Subject: fail Test-Trap-v0.3.4\t\15-tempfile-options.t Error removing C:/DOCUME~1/usr/LOCALS~1/Temp/775O0HKOLH at D:/citrusperl/site/lib/File/Temp.pm line 762.
Hi I discovered this after encountering MarpaX-Languages-C-AST-0.48\t\syntax-error.t $ perl -Mblib -T t/syntax-error.t 1..2 ok 1 - use MarpaX::Languages::C::AST; Uncaught exception from user code: Rethrowing internal exception: Error in tempfile() using template \XXXXXXXXXX: Could not create temp file \FlANM A498Z: 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(0xc3bb7c)', 'Test::Trap', 'GLOB(0xbb0dd4)', 'ARRAY(0xc7410c) ', 'CODE(0x33f901c)') called at D:/citrusperl/site/lib/Test/Trap.pm line 38 Test::Trap::__ANON__('CODE(0x33f901c)') 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. The same error happens with both version of File::Temp $ mversion Test::Trap File::Temp 0.3.4 0.2304 $ mversion Test::Trap File::Temp 0.3.4 0.2309 $ perl -T t/15-tempfile-options.t 1..30 ok 1 - TempFile 'basic' strategy doesn't handle l stroke ok 2 - (and warns) ok 3 - TempFile 'preserve' strategy doesn't handle l stroke ok 4 - (and warns) ok 5 - TempFile 'utf8' strategy handles l stroke ok 6 - (no warning) ok 7 - TempFile 'both' strategy handles l stroke ok 8 - (no warning) ok 9 - TempFile 'latin2' strategy handles l stroke ok 10 - (no warning) ok 11 - TempFile 'basic' strategy doesn't handle pi ok 12 - (and warns) ok 13 - TempFile 'preserve' strategy handles pi ok 14 - (no warning) ok 15 - TempFile 'utf8' strategy handles pi ok 16 - (no warning) ok 17 - TempFile 'both' strategy handles pi ok 18 - (no warning) ok 19 - TempFile 'latin2' strategy doesn't handle pi; falls back to \x notation ok 20 - (and warns) ok 21 - TempFile 'basic' strategy doesn't handle per mille ok 22 - (and warns) ok 23 - TempFile 'preserve' strategy doesn't handle per mille; falls back to \x notation ok 24 - (and warns) ok 25 - TempFile 'utf8' strategy handles per mille ok 26 - (no warning) ok 27 - TempFile 'both' strategy doesn't handle per mille; falls back to \x notation ok 28 - (and warns) ok 29 - TempFile 'latin2' strategy doesn't handle per mille; falls back to \x notation ok 30 - (and warns) Error removing C:/DOCUME~1/username/LOCALS~1/Temp/775O0HKOLH at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/gSqD0Ayd4D at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/5fbToMPS5e at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/DUYa0LOsZS at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/6IfAtLfn9d at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/iUGdsRfRif at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/zqr1Xcs6cF at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/gBVpxNGmo9 at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/iFwhB_2RWK at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/1VVK6HLWa0 at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/cVMA84d9Un at D:/citrusperl/site/lib/File/Temp.pm line 762. Error removing C:/DOCUME~1/username/LOCALS~1/Temp/T9pfTbAEJv at D:/citrusperl/site/lib/File/Temp.pm line 762.
Subject: Re: [rt.cpan.org #129996] fail Test-Trap-v0.3.4\t\15-tempfile-options.t Error removing C:/DOCUME~1/usr/LOCALS~1/Temp/775O0HKOLH at D:/citrusperl/site/lib/File/Temp.pm line 762.
Date: Sun, 7 Jul 2019 16:00:46 +0200
To: bug-Test-Trap [...] rt.cpan.org
From: The Sidhekin <sidhekin [...] gmail.com>
On Sat, Jul 6, 2019 at 11:52 PM noreply via RT <bug-Test-Trap@rt.cpan.org> wrote: Show quoted text
> Sat Jul 06 17:51:57 2019: Request 129996 was acted upon. > Transaction: Ticket created by b3608017@urhen.com > Queue: Test-Trap > Subject: fail Test-Trap-v0.3.4\t\15-tempfile-options.t Error removing > C:/DOCUME~1/usr/LOCALS~1/Temp/775O0HKOLH at > D:/citrusperl/site/lib/File/Temp.pm > line 762. > Broken in: v0.3.4 > Severity: (no value) > Owner: Nobody > Requestors: b3608017@urhen.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=129996 > > > > Hi > I discovered this after encountering > > MarpaX-Languages-C-AST-0.48\t\syntax-error.t > $ perl -Mblib -T t/syntax-error.t > 1..2 > ok 1 - use MarpaX::Languages::C::AST; > Uncaught exception from user code: > Rethrowing internal exception: Error in tempfile() using template > \XXXXXXXXXX: Could not create temp file \FlANM > A498Z: Permission denied at > D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. >
The Test::Trap modules don't set the template, or anything from which it is built (directory, prefix, suffix), so this seems to originate from your installation or run-time configuration of File::Temp. Does File::Temp work if you call it directly, with the same user, drive, and other environment? perl -MFile::Temp=tempfile -e "tempfile()" If this fails, the File::Temp installation or configuration is broken. (Perhaps the default temp dir is missing a drive letter?) And if this works, I'd guess something in your build or test process is changing your user, drive, or other environment. (Either way, while I'm no expert on File::Temp, or even Windows, it seems kinda suspicious that the template does not include a drive letter. It seems it would make File::Temp try to create the temp files on the current drive, and the user might easily have permissions on the root directory of some drive but not the others. Or maybe that's just how Windows works?) $ perl -T t/15-tempfile-options.t Show quoted text
> 1..30 >
[ snip ] Show quoted text
> Error removing C:/DOCUME~1/username/LOCALS~1/Temp/1VVK6HLWa0 at > D:/citrusperl/site/lib/File/Temp.pm line 762. > Error removing C:/DOCUME~1/username/LOCALS~1/Temp/cVMA84d9Un at > D:/citrusperl/site/lib/File/Temp.pm line 762. > Error removing C:/DOCUME~1/username/LOCALS~1/Temp/T9pfTbAEJv at > D:/citrusperl/site/lib/File/Temp.pm line 762. >
I have seen these warnings before, but only in smoke reports. I have not been able to reproduce them. Yes, they claim to be errors, but they are caught by File::Temp and reported as warnings. Noise and clutter, but no harm done. They do not impact the functionality of Test::Trap; at most they may cause it to fail to clean up after itself (I don't know if it actually does; I have not reproduced this). If I knew what to do to make File::Temp's cleanup work right, I would, but I have no idea, and I doubt it is high priority to anyone – certainly no one has volunteered to help track it down. And just to be clear, these warnings do not cause the failures to create tempfiles while using Test::Trap. Eirik
Subject: Re: [rt.cpan.org #129996] fail Test-Trap-v0.3.4\t\15-tempfile-options.t Error removing C:/DOCUME~1/usr/LOCALS~1/Temp/775O0HKOLH at D:/citrusperl/site/lib/File/Temp.pm line 762.
Date: Sun, 7 Jul 2019 17:09:55 +0200
To: bug-Test-Trap [...] rt.cpan.org
From: The Sidhekin <sidhekin [...] gmail.com>
I could be more clear here: Rethrowing internal exception: Error in tempfile() using template Show quoted text
> \XXXXXXXXXX: Could not create temp file \FlANM > A498Z: Permission denied at > D:/citrusperl/site/lib/Test/Trap/Builder/TempFile.pm line 29. > at t/syntax-error.t line 15. >
[snip] Show quoted text
> Error removing C:/DOCUME~1/username/LOCALS~1/Temp/T9pfTbAEJv at > D:/citrusperl/site/lib/File/Temp.pm line 762. >
In these two processes, File::Temp is looking at two different directories. It should be working in File::Spec->tmpdir, but something (environment?) is causing it to have two different values in your two runs. File::Temp::Win32::tmpdir (which I assume you're using) is documented to return "a string representation of the first existing directory from the following list": $ENV{TMPDIR} $ENV{TEMP} $ENV{TMP} SYS:/temp C:\system\temp C:/temp /tmp / Running MarpaX-Languages-C-AST-0.48\t\syntax-error.t, it seems to use "/"; running Test-Trap's t/15-tempfile-options.t, it seems to use "C:/DOCUME~1/username/LOCALS~1/Temp/". The former fails (file creation permission denied); the latter works (even if the cleanup seems to fail, and may leave leftovers in "C:/DOCUME~1/username/LOCALS~1/Temp/"). Eirik