summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-04-01 13:02:35 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-01 16:07:59 +0000
commit3fc971374f1b931c73c9d94ee9ba7b82bfa682de (patch)
tree7bffe02f276fb9b15b43195f817a85394b88fb7b /t
parent3a91618cf97865fdc6d1200abc2316c97ddf570e (diff)
downloadperl-3fc971374f1b931c73c9d94ee9ba7b82bfa682de.tar.gz
Re: 5.8.1@19053 bug: make minitest fails with threads
Message-Id: <20030401110235.3f20ffb2.rgarciasuarez@free.fr> p4raw-id: //depot/perl@19117
Diffstat (limited to 't')
-rw-r--r--t/op/getpid.t17
1 files changed, 12 insertions, 5 deletions
diff --git a/t/op/getpid.t b/t/op/getpid.t
index f1a40636b4..a2c5f5f0e2 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;