From 3fc971374f1b931c73c9d94ee9ba7b82bfa682de Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 1 Apr 2003 13:02:35 +0200 Subject: [PATCH] Re: 5.8.1@19053 bug: make minitest fails with threads Message-Id: <20030401110235.3f20ffb2.rgarciasuarez@free.fr> p4raw-id: //depot/perl@19117 --- t/op/getpid.t | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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; -- 2.7.4