Skip Menu |

This queue is for tickets about the Archive-Tar-Wrapper CPAN distribution.

Report information
The Basics
Id: 86753
Status: resolved
Priority: 0/
Queue: Archive-Tar-Wrapper

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.17
Fixed in: (no value)



Subject: Tests fail under HARNESS_OPTIONS=j10
Given the errors I'm seeing, it looks like a case of multiple tests using the same paths.

Usually this means you need more File::Temp, or similar anti-collision mechanisms.


PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.18.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Show quoted text
===(      19;1  11/23  1/5  1/4  2/6  1/4  3/4 )========================Cannot mkdir t/data/tmp at t/002Mult.t line 20.
Show quoted text
# Looks like you planned 5 tests but ran 1.
# Looks like your test exited with 17 just after 1.
t/002Mult.t ...... Dubious, test returned 17 (wstat 4352, 0x1100)       
Failed 4/5 subtests
t/005Cwd.t ....... ok                                                   
Show quoted text
===(      22;1  11/23  1/4  2/6  3/4 )==================================
Show quoted text
#   Failed test 'opening compressed tarfile'
#   at t/003Dirs.t line 25.
Can't chdir to t/data/tmp/rn1Us9D5Am/tar (No such file or directory) at /home/kent/.cpanm/work/1373119911.33379/Archive-Tar-Wrapper-0.17/blib/lib/Archive/Tar/Wrapper.pm line 288
Show quoted text
# Looks like you planned 4 tests but ran 2.
# Looks like you failed 1 test of 2 run.
# Looks like your test exited with 2 just after 2.
t/003Dirs.t ...... Dubious, test returned 2 (wstat 512, 0x200)          
Failed 3/4 subtests
t/006DirPerms.t .. ok                                                   
t/004Utf8.t ...... ok                                                   
t/001Basic.t ..... ok     

Test Summary Report
-------------------
t/002Mult.t    (Wstat: 4352 Tests: 1 Failed: 0)
  Non-zero exit status: 17
  Parse errors: Bad plan.  You planned 5 tests but ran 1.
t/003Dirs.t    (Wstat: 512 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 4 tests but ran 2.
Subject: [PATCH] Tests fail under HARNESS_OPTIONS=j10
https://github.com/mschilli/archive-tar-wrapper-perl/pull/4

Its reasonably straight forward to fix this sufficiently for what appears to be the majority of the problem.

Subject: 0001-Run-002-and-003-in-seperate-temporary-directories.-r.patch
From a2c8b3dbeab34cbb65f2826515c371a954c08652 Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentfredric@gmail.com> Date: Sun, 7 Jul 2013 02:36:31 +1200 Subject: [PATCH] Run 002 and 003 in seperate temporary directories. (rt#86753) both t/002Mult.t and t/003Dirs.t create t/data/tmp, and both attempt to delete that path when its done. This has a negative effect, because one will frequently terminate before the other, and will delete all the files the other test relied upon. So this patch does the smallest possible thing to resolve this, creating the tempdirs suffixed by "_$$", which keeps everything clean, and avoids frequent collisions. --- t/002Mult.t | 2 +- t/003Dirs.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/002Mult.t b/t/002Mult.t index 80258c1..d37a448 100644 --- a/t/002Mult.t +++ b/t/002Mult.t @@ -11,7 +11,7 @@ use File::Temp qw(tempfile); my $TARDIR = "data"; $TARDIR = "t/$TARDIR" unless -d $TARDIR; -my $TMPDIR = "$TARDIR/tmp"; +my $TMPDIR = "$TARDIR/tmp_$$"; use Test::More tests => 5; BEGIN { use_ok('Archive::Tar::Wrapper') }; diff --git a/t/003Dirs.t b/t/003Dirs.t index 089e76d..165c03f 100644 --- a/t/003Dirs.t +++ b/t/003Dirs.t @@ -11,7 +11,7 @@ use File::Temp qw(tempfile); my $TARDIR = "data"; $TARDIR = "t/$TARDIR" unless -d $TARDIR; -my $TMPDIR = "$TARDIR/tmp"; +my $TMPDIR = "$TARDIR/tmp_$$"; use Test::More tests => 4; BEGIN { use_ok('Archive::Tar::Wrapper') }; -- 1.8.1.5