Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-Cover CPAN distribution.

Report information
The Basics
Id: 5175
Status: resolved
Priority: 0/
Queue: Devel-Cover

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

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



Sam Villain suggested I try Devel::Cover instead of the homegrown test coverage library I'm currently using for POE. I was skeptical, having seen it fail pretty badly in the past, but I gave it a shot. Devel::Cover 0.34 (Perl 5.8.2, singlethreaded) works much better than in the past. It still introduces test failures, however. I used a modified version of the recommended "make test" commands: /usr/local/perl-582/bin/cover -delete HARNESS_PERL_SWITCHES=-MDevel::Cover make test /usr/local/perl-582/bin/cover I suspect that the errors are caused by C<use>ing modules from string eval(). I'm doing that to test the presence of modules so I can skip some tests. The first error: t/06_tk....................ok 1/11Subroutine Tk::Widget::IsLabel redefined at /usr/local/perl-582/i386-freebsd/Tk/Widget.pm line 250. Failed to AUTOLOAD 'Tk::Widget::Tk_cmd' at t/06_tk.t line 128 XS_Tk__Callback_Call error:Can't use an undefined value as a SCALAR reference at t/06_tk.t line 258. (in cleanup) Can't use an undefined value as filehandle reference at /usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86 during global destruction. (in cleanup) Bad filehandle: 1 at /usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86 during global destruction. t/06_tk....................dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-11 Failed 10/11 tests, 9.09% okay The second message really isn't an error. Devel::Cover can't find Storable even though Perl could. This really seems to point to string eval being the culprit. t/17_filter_ref............ok 89/89Devel::Cover: Can't find file "blib/lib/Storable.pm": ignored. And the third is just wacky: t/31_gtk2..................Assertion ((PL_compcv)->sv_flags & 0xff) == SVt_PVCV failed: file "toke.c", line 7681 at /usr/local/perl-582/i386-freebsd/B.pm line 231. CHECK failed--call queue aborted at t/31_gtk2.t line 30. Bad hash at /usr/local/perl-582/i386-freebsd/Devel/Cover.pm line 360. END failed--call queue aborted at t/31_gtk2.t line 30. t/31_gtk2..................dubious Test returned status 2 (wstat 512, 0x200) -- Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/
Date: Thu, 11 Mar 2004 01:38:54 +0100
From: Paul Johnson <paul [...] pjcj.net>
To: via RT <bug-Devel-Cover [...] rt.cpan.org>
Subject: Re: [cpan #5175]
RT-Send-Cc:
On Mon, Feb 02, 2004 at 07:32:29PM -0500, via RT wrote: Show quoted text
> The first error: > > t/06_tk....................ok 1/11Subroutine Tk::Widget::IsLabel > redefined at /usr/local/perl-582/i386-freebsd/Tk/Widget.pm line 250. > Failed to AUTOLOAD 'Tk::Widget::Tk_cmd' at t/06_tk.t line 128 > XS_Tk__Callback_Call error:Can't use an undefined value as a SCALAR > reference at t/06_tk.t line 258. > > (in cleanup) Can't use an undefined value as filehandle > reference at /usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86 > during global destruction. > (in cleanup) Bad filehandle: 1 at > /usr/local/perl-582/i386-freebsd/Tk/Event/IO.pm line 86 during global > destruction. > t/06_tk....................dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 2-11 > Failed 10/11 tests, 9.09% okay
This works fine for me using perl 5.8.3, Tk-804.025_beta16 and Devel::Cover 0.37 on Solaris 8. It's hard to say where the bug was, but it appears to have been fixed. Show quoted text
> The second message really isn't an error. Devel::Cover can't find > Storable even though Perl could. This really seems to point to string > eval being the culprit. > > t/17_filter_ref............ok 89/89Devel::Cover: Can't find file > "blib/lib/Storable.pm": ignored.
I see this too. I'll look into it, though in this case the coverage would not have been reported so you can safely ignore the warning. Show quoted text
> And the third is just wacky: > > t/31_gtk2..................Assertion ((PL_compcv)->sv_flags & 0xff) == > SVt_PVCV failed: file "toke.c", line 7681 at > /usr/local/perl-582/i386-freebsd/B.pm line 231. > CHECK failed--call queue aborted at t/31_gtk2.t line 30. > Bad hash at /usr/local/perl-582/i386-freebsd/Devel/Cover.pm line 360. > END failed--call queue aborted at t/31_gtk2.t line 30. > t/31_gtk2..................dubious > Test returned status 2 (wstat 512, 0x200)
I'll need to install gtk2 to track this down. I have seen similar messages before when using bleadperl, but not from a stable release. If you are able to test it, I would be interested to know whether this error still occurs with 5.8.3. Thanks very much for the report. -- Paul Johnson - paul@pjcj.net http://www.pjcj.net
I think it's about time this one got closed. I've just run the latest Devel::Cover on perl 5.14.0-tobe with the latest Tk and, whilst not perfect, the results are pretty good. If I ever get a perfect coverage run against Tk I will pronounce the project complete.