From: Rafael Garcia-Suarez Date: Tue, 1 Apr 2003 11:02:35 +0000 (+0200) Subject: Re: 5.8.1@19053 bug: make minitest fails with threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3fc971374f1b931c73c9d94ee9ba7b82bfa682de;p=p5sagit%2Fp5-mst-13.2.git Re: 5.8.1@19053 bug: make minitest fails with threads Message-Id: <20030401110235.3f20ffb2.rgarciasuarez@free.fr> p4raw-id: //depot/perl@19117 --- diff --git a/t/op/getpid.t b/t/op/getpid.t index f1a4063..a2c5f5f 100644 --- a/t/op/getpid.t +++ b/t/op/getpid.t @@ -11,8 +11,6 @@ BEGIN { use strict; use Config; -plan tests => 2; - BEGIN { if (!$Config{useithreads}) { print "1..0 # Skip: no ithreads\n"; @@ -22,11 +20,20 @@ BEGIN { print "1..0 # Skip: no getppid\n"; exit; } + eval 'use threads; use threads::shared'; + if ($@ =~ /dynamic loading not available/) { + print "1..0 # Skip: no dynamic loading, no threads\n"; + exit; + } + plan tests => 3; + if ($@) { + fail("unable to load thread modules"); + } + else { + pass("thread modules loaded"); + } } -use threads; -use threads::shared; - my ($pid, $ppid) = ($$, getppid()); my $pid2 : shared = 0; my $ppid2 : shared = 0;