Skip Menu |

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

Report information
The Basics
Id: 94383
Status: resolved
Priority: 0/
Queue: Test-Modern

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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



Subject: Tests failing on all Fedora releases except Rawhide
Test::Modern 0.006 is generating warnings in _setup_inc in all Fedora Linux releases except the development branch (and RHEL 7 beta too), like this: make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01basic.t ............. ok t/02exporting.t ......... ok t/03extended.t .......... skipped: Not running extended tests t/04requires.t .......... skipped: Test requires Local::I::Doubt::This::Exists::Either 999.999 Use of uninitialized value $file in string ne at /usr/lib/perl5/vendor_perl/File/Spec/Unix.pm line 321. Use of uninitialized value $file in concatenation (.) or string at /usr/lib/perl5/vendor_perl/File/Spec/Unix.pm line 329. # Failed test 'no (unexpected) warnings (via done_testing)' # at t/05warnings.t line 30. # Looks like you failed 1 test of 2. t/05warnings.t .......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Use of uninitialized value $file in string ne at /usr/lib/perl5/vendor_perl/File/Spec/Unix.pm line 321. Use of uninitialized value $file in concatenation (.) or string at /usr/lib/perl5/vendor_perl/File/Spec/Unix.pm line 329. # Failed test 'no (unexpected) warnings (via done_testing)' # at t/06class-api-ok.t line 33. # Looks like you failed 1 test of 2. t/06class-api-ok.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests All of the remaining tests fail in the same way. This appears to be coming from the 'File::Spec'->catpath(@tmp); call in _setup_inc but I'm struggling to see what's different between the Rawhide build, which doesn't trigger this, and all of the others.
I have a workaround for the problem, though I'm not fond of it. Could you please tell me the output of the following command on one of the Redhat releases where the test suite is broken, and on one of the Redhat releases where it's not? perl -MFile::Spec -le'print for $], $File::Spec::VERSION, $File::Spec::Unix::VERSION' Thanks.
From: paul [...] city-fan.org
On Fri Apr 04 04:52:57 2014, TOBYINK wrote: Show quoted text
> I have a workaround for the problem, though I'm not fond of it. Could > you please tell me the output of the following command on one of the > Redhat releases where the test suite is broken, and on one of the > Redhat releases where it's not? > > perl -MFile::Spec -le'print for $], $File::Spec::VERSION, > $File::Spec::Unix::VERSION'
I'd looked at this prior to reporting, which is why I was struggling to see a difference. Rawhide (working) has: $ perl -MFile::Spec -le'print for $], $File::Spec::VERSION, $File::Spec::Unix::VERSION' 5.018002 3.40 3.40 Fedora 20 (most recent non-working) has: $ perl -MFile::Spec -le'print for $], $File::Spec::VERSION, $File::Spec::Unix::VERSION' 5.018002 3.40 3.40 So it's not the perl or PathTools version...
From: paul [...] city-fan.org
On Fri Apr 04 04:56:31 2014, TOBYINK wrote: Show quoted text
> In the mean time, this is the workaround: > > https://github.com/tobyink/p5-test- > modern/commit/0c0b0f67d3b072c209d663801cd06b7357585a9f.diff
This gets the tests passing (and hence building successfully) but it doesn't get rid of the warnings, resulting ugly output from the test run. Anything else you'd like me to try?
Silly me, "IGNORE" is apparently not supported for $SIG{__WARN__}. The following gets the tests passing with no noise: local $SIG{__WARN__} = sub {}; I'll try to get access to a Fedora box for testing. (I do most of my development on Ubuntu these days.)
I've gotten a shell account running CentOS 5.9 (which I figured was close enough), bootstrapped local::lib, and installed cpanminus. One of those things brought in an update to File::Spec... -bash-3.2$ cat /etc/redhat-release CentOS release 5.9 (Final) -bash-3.2$ perl -MFile::Spec -le'print for $], $File::Spec::VERSION, $File::Spec::Unix::VERSION' 5.008008 3.40 3.40 After that I was able to install Test-Modern-0.006 cleanly.
From: paul [...] city-fan.org
On Fri Apr 04 16:11:57 2014, TOBYINK wrote: Show quoted text
> I've gotten a shell account running CentOS 5.9 (which I figured was > close enough), bootstrapped local::lib, and installed cpanminus. One > of those things brought in an update to File::Spec... > > -bash-3.2$ cat /etc/redhat-release > CentOS release 5.9 (Final) > -bash-3.2$ perl -MFile::Spec -le'print for $], $File::Spec::VERSION, > $File::Spec::Unix::VERSION' > 5.008008 > 3.40 > 3.40 > > After that I was able to install Test-Modern-0.006 cleanly.
CentOS 5.anything is just about as old as you get in the Red Hat world. The oldest OS I've been trying to build on is Fedora 14, which is a similar vintage to CentOS 6. The workaround from git worked everywhere I've tried it but I still haven't pinned down what was causing the warnings in the first place yet.
From: andreas [...] andreasvoegele.com
I get these warnings too. The bug is in _setup_inc(). The catpath() function gets an undefined $file argument as "pop @tmp" removes the file from the triple returned by splitpath(). my $dir = do { my @tmp = 'File::Spec'->splitpath($opts->{into_file}); pop @tmp; 'File::Spec'->catpath(@tmp); }; my $dir = do { my ($tmp_vol, $tmp_dir, $tmp_file) = 'File::Spec'->splitpath($opts->{into_file}); $tmp_file = ''; 'File::Spec'->catpath($tmp_vol, $tmp_dir, $tmp_file); };
Thanks Andreas; that looks like the likely cause. I've released a version 0.007 which hopefully fixes this issue properly. If you're still having problems with it, please re-open this ticket.