Skip Menu |

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

Report information
The Basics
Id: 37694
Status: rejected
Priority: 0/
Queue: Test-Harness

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

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



Subject: Parallel operation problems (--fork)
Parallel operation does not seem to work on my machine (linux, perl 5.8.8). If I try to prove Test-Harness-3.12 with -j4 --fork itself, then I get only a Storable error: $ perl -Mblib blib/script/prove -j4 --fork Can't store CODE items at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_store_fd.al) line 304, at /usr/local/share/perl/5.8.8/Parallel/Iterator.pm line 673 So maybe B::Deparse should be turned on for Storable? I tried this with the following patch: --- ./lib/TAP/Harness.pm Wed Jun 18 01:27:31 2008 +++ ./lib/TAP/Harness.pm Tue Jul 15 15:55:02 2008 @@ -405,6 +405,8 @@ sub _aggregate_forked { croak "Parallel::Iterator required for --fork option ($@)" if $@; + local $Storable::Deparse = 1; + local $Storable::Eval = 1; my $iter = Parallel::Iterator::iterate( { workers => $self->jobs || 0 }, sub { and rerun the test, and now I get # Testing Test::Harness 3.12, Perl 5.008008, /usr/bin/perl t/000-load............. ok ===( 0 )========================================================== ... and nothing happens anymore. top shows me that there are indeed multiple processes running, and strace shows that there's a lot of transporting Storable-serialized data in a pipe or so. It is also surprising that it is possible to specify -j without --fork. Then everything works, the output looks different, but it seems to work as a single job only. Regards, Slaven
I've decided to remove the --fork option. In all the real-world scenarios I've seen there's no performance advantage over -j on its own - and recent architectural changes have made it rather difficult to continue to fork in the harness. If you have a compelling use case speak up quickly otherwise it's gone :)