Skip Menu |
 

This queue is for tickets about the IO-Zlib CPAN distribution.

Report information
The Basics
Id: 105700
Status: open
Priority: 0/
Queue: IO-Zlib

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

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

Attachments
0001-IO-Zlib-fix-for-parallel-tests.patch



Subject: test failure
Download (untitled) / with headers
text/plain 1.5k
This is on darwin, perl 5.8.8: --> Working on IO::Zlib Fetching http://mirrors.gossamer-threads.com/CPAN/authors/id/T/TO/TOMHUGHES/IO-Zlib-1.10.tar.gz -> OK Unpacking IO-Zlib-1.10.tar.gz Entering IO-Zlib-1.10 Checking configure dependencies from META.yml Configuring IO-Zlib-1.10 Running Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for IO::Zlib Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have Compress::Zlib 2 ... Yes (2.068) Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.05_24) Building and testing IO-Zlib-1.10 Manifying 1 pod document PERL_DL_NONLAZY=1 "/Users/ether/perl5/perlbrew/perls/8.8/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/getline.t ... ok t/basic.t ..... ok Can't call method "gzeof" on an undefined value at /Users/ether/.cpanm/work/1436229252.50837/IO-Zlib-1.10/blib/lib/IO/Zlib.pm line 506. t/external.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 13/33 subtests t/import.t .... ok t/getc.t ...... ok t/large.t ..... ok t/uncomp1.t ... ok t/uncomp2.t ... ok t/tied.t ...... ok Test Summary Report ------------------- t/external.t (Wstat: 512 Tests: 21 Failed: 1) Failed test: 21 Non-zero exit status: 2 Parse errors: Bad plan. You planned 33 tests but ran 21. Files=9, Tests=110, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.46 cusr 0.06 csys = 0.58 CPU) Result: FAIL Failed 1/9 test programs. 1/110 subtests failed.
Download (untitled) / with headers
text/plain 235b
Setting HARNESS_OPTIONS=j9, or using 'prove -b -r -j9 t', reproduces the issue. You need to use unique temp files and directories for each test, as when multiple tests run at once they stomp on each others' work. File::Temp can help.
Download (untitled) / with headers
text/plain 407b
On Mon Jul 06 18:38:34 2015, ETHER wrote: Show quoted text
> Setting HARNESS_OPTIONS=j9, or using 'prove -b -r -j9 t', reproduces > the issue. > > You need to use unique temp files and directories for each test, as > when multiple tests run at once they stomp on each others' work. > File::Temp can help.
It's best to make this testable in parallel, but perl 5 blead has now reverted to test this distribution serially.
Download (untitled) / with headers
text/plain 123b
See attached patch to fix parallel testing. BTW: Is this still maintained? It's not strict safe neither. -- Reini Urban
Subject: 0001-IO-Zlib-fix-for-parallel-tests.patch
From 25c8dc54c4dd240dd36cc88c5212574d72c24f15 Mon Sep 17 00:00:00 2001 From: Reini Urban <rurban@cpan.org> Date: Tue, 16 Apr 2019 10:37:01 +0200 Subject: [PATCH] IO-Zlib: fix for parallel tests --- cpan/IO-Zlib/t/basic.t | 4 ++-- cpan/IO-Zlib/t/external.t | 4 ++-- cpan/IO-Zlib/t/getc.t | 2 +- cpan/IO-Zlib/t/getline.t | 2 +- cpan/IO-Zlib/t/large.t | 2 +- cpan/IO-Zlib/t/tied.t | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git cpan/IO-Zlib/t/basic.t cpan/IO-Zlib/t/basic.t index 80aed9c60b..3324fed26f 100644 --- cpan/IO-Zlib/t/basic.t +++ cpan/IO-Zlib/t/basic.t @@ -11,11 +11,11 @@ sub ok print "not ok $no\n" unless $ok ; } -$name="test.gz"; +my $name="test$$.gz"; print "1..17\n"; -$hello = <<EOM ; +my $hello = <<EOM ; hello world this is a test EOM diff --git cpan/IO-Zlib/t/external.t cpan/IO-Zlib/t/external.t index 1d90d7fe2c..ab0a7136b1 100644 --- cpan/IO-Zlib/t/external.t +++ cpan/IO-Zlib/t/external.t @@ -86,9 +86,9 @@ ok(14, $@ =~ /^IO::Zlib::gzopen_external: mode 'xyz' is illegal /); # The following is a copy of the basic.t, shifted up by 14 tests, # the difference being that now we should be using the external gzip. -$name="test.gz"; +my $name="test$$.gz"; -$hello = <<EOM ; +my $hello = <<EOM ; hello world this is a test EOM diff --git cpan/IO-Zlib/t/getc.t cpan/IO-Zlib/t/getc.t index 2424d5b245..e2318de71b 100644 --- cpan/IO-Zlib/t/getc.t +++ cpan/IO-Zlib/t/getc.t @@ -11,7 +11,7 @@ sub ok print "not ok $no\n" unless $ok ; } -$name="test.gz"; +$name="test$$.gz"; print "1..10\n"; diff --git cpan/IO-Zlib/t/getline.t cpan/IO-Zlib/t/getline.t index fed17dac11..0e031a6c78 100644 --- cpan/IO-Zlib/t/getline.t +++ cpan/IO-Zlib/t/getline.t @@ -11,7 +11,7 @@ sub ok print "not ok $no\n" unless $ok ; } -$name="test.gz"; +$name="test$$.gz"; print "1..23\n"; diff --git cpan/IO-Zlib/t/large.t cpan/IO-Zlib/t/large.t index 0203182004..2f50532db6 100644 --- cpan/IO-Zlib/t/large.t +++ cpan/IO-Zlib/t/large.t @@ -11,7 +11,7 @@ sub ok print "not ok $no\n" unless $ok ; } -$name="test.gz"; +$name="test$$.gz"; print "1..7\n"; diff --git cpan/IO-Zlib/t/tied.t cpan/IO-Zlib/t/tied.t index 029b282721..23bc041046 100644 --- cpan/IO-Zlib/t/tied.t +++ cpan/IO-Zlib/t/tied.t @@ -11,7 +11,7 @@ sub ok print "not ok $no\n" unless $ok ; } -$name="test.gz"; +$name="test$$.gz"; print "1..11\n"; -- 2.20.1
Download (untitled) / with headers
text/plain 1.2k
On Tue Apr 16 04:45:14 2019, RURBAN wrote: Show quoted text
> See attached patch to fix parallel testing. > > BTW: Is this still maintained? It's not strict safe neither.
Sure it's maintained but it generally doesn't need any maintenance because it just works. I also don't normally pay much attention to RT tickets because they're such an utter pain in the arse to work with. What appears to have happened here is that somebody has broken the implicit contract that tests are run serially - as this module has never claimed to support that it would appear that the bug is in the caller and that is now fixed as I understand it. I have now been able to reproduce it by setting HARNESS_OPTIONS and can confirm that the default still appears to be to run the tests in serial and it requires deliberate user intervention to request parallel testing, so it seems that this "bug" is in reality an enhancement request, requesting support for parallel testing - that does seem rather overkill for such a trivial test suite but we can consider it. As for "strict safe" well that is obviously not a matter for this ticket but it appears to be from my testing: perl -e "use strict; use IO::Zlib;" produces no warnings or errors with perl 5.28.1 on my machine.
Download (untitled) / with headers
text/plain 122b
See also https://github.com/rurban/IO-Zlib for 1.10_01 which I just uploaded to CPAN, fixing more issues. -- Reini Urban
Download (untitled) / with headers
text/plain 331b
On Tue Apr 16 05:06:27 2019, RURBAN wrote: Show quoted text
> See also https://github.com/rurban/IO-Zlib > for 1.10_01 which I just uploaded to CPAN, fixing more issues.
What do you mean just uploaded to CPAN!?! Have you just used some sort of admin power to upload a version without waiting even five minutes for me to consider your fix first?
Download (untitled) / with headers
text/plain 250b
On Tue Apr 16 05:06:27 2019, RURBAN wrote: Show quoted text
> See also https://github.com/rurban/IO-Zlib > for 1.10_01 which I just uploaded to CPAN, fixing more issues.
I have now published the real git history for IO::Zlib at https://github.com/tomhughes/IO-Zlib.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.