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: 8660
Status: resolved
Priority: 0/
Queue: Devel-Cover

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



Subject: Devel::Cover can't handle Test::More thread tests
Tried running Devel::Cover against Test::More 0.53's tests with 5.8.1 RC3 and 5.8.5 on OS X both with threads enabled. It hung on t/sort_bug.t. t/threads.t segfaulted. t/thread_taint.t failed.
[MSCHWERN - Tue Nov 30 00:44:39 2004]: Show quoted text
> Tried running Devel::Cover against Test::More 0.53's tests with 5.8.1 > RC3 and 5.8.5 on OS X both with threads enabled. > > It hung on t/sort_bug.t. t/threads.t segfaulted. t/thread_taint.t > failed.
Part of this may be due to the fact that Devel::Cover turns on threads when possible. The t/thread_taint.t failure is likely to be because of it as that test simply checks to make sure Test::More does not load threads.pm. Test::More had a similar problem with threads and interfering with the test results. It had to load threads.pm early in order to make itself thread safe but loading threads all the time broke people's tests which assumed threading was off. Test::More now has a caveat about loading threads.pm before TM, Devel::Cover does not have this luxury. What you could do is stick a code ref into @INC which watches for threads.pm being loaded. When its loaded, then you stick in your special threading code. Sort of a "just in time" approach.
Threads is still broken and requires more effort, or probably a rethink to get working, so for now Devel::Cover will bail out if used in a threaded environment.
Thanks very much for this report. I'm going to close this ticket as the resolution, at least for the foreseeable future, is that Devel::Cover just doesn't work with threads. It doesn't even try to any more, since a fully working Devel::Cover needs to change the optree, and the optree is shared amongst threads, which causes great confusion. It might be possible to get a subset of Devel::Cover working with threads. I'm not sure whether this is worthwhile, but I have added it as an item on the TODO list. Devel::Cover is working fine on OSX, according to the latest CPAN testers reports. Thanks again.