From: Vincent Pit Date: Mon, 20 Dec 2010 00:25:57 +0000 (+0100) Subject: Skip threads tests unless perl version is 5.13.4 or greater X-Git-Tag: v0.13~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=commitdiff_plain;h=fbb06f79497005630181247a55581fd0387e49d9 Skip threads tests unless perl version is 5.13.4 or greater There was a long standing bug in the handling of GV <-> CV double linkage that could (and explicitely did with a poisonous perl) cause segfaults at thread destruction. It got fixed by Dave in commit 803f274 which went in 5.13.3, but the fix was amended for 5.13.4 in commit 09aad8f. Since it's not really fair for the user to not be able to install the module because of this, we skip the threads tests unless perl is at least 5.13.4. --- diff --git a/t/59-unwind-threads.t b/t/59-unwind-threads.t index ddeacb9..aabb5fe 100644 --- a/t/59-unwind-threads.t +++ b/t/59-unwind-threads.t @@ -12,9 +12,14 @@ sub skipall { use Config qw/%Config/; BEGIN { + my $force = $ENV{PERL_SCOPE_UPPER_TEST_THREADS} ? 1 : !1; + my $t_v = $force ? '0' : '1.67'; skipall 'This perl wasn\'t built to support threads' unless $Config{useithreads}; - skipall 'threads required to test thread safety' unless eval "use threads; 1"; + skipall 'perl 5.13.4 required to test thread safety' + unless $force or $] >= 5.013004; + skipall "threads $t_v required to test thread safety" + unless eval "use threads $t_v; 1"; } use Test::More;