develooper Front page | perl.perl5.porters | Postings from January 2018

[perl #132790] Test dist/Storable/t/blessed.t fails with threadedperls < 5.14 under not too old Test2

Thread Previous
From:
perlbug-followup
Date:
January 31, 2018 04:20
Subject:
[perl #132790] Test dist/Storable/t/blessed.t fails with threadedperls < 5.14 under not too old Test2
Message ID:
rt-4.0.24-9743-1517372426-580.132790-75-0@perl.org
# New Ticket Created by  (Andreas J. Koenig) 
# Please include the string:  [perl #132790]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132790 >


Three little birdies twittered the story to me, I lend them my voice
to let you know about it.

This is not about a bug in Storable. It's about a bug in old threaded
perls and how this bug unfolded over time.

The bug in perl itself was fixed in v5.19.2-116-g82b84d0.

Test::More 1.001014 did not trigger the bug, it was only exposed
within dist/Storable/t/blessed.t through the changes in Test2.

But Test2 developed a workaround for the bug. Unfortunately that
workaround could only be applied to perls >= 5.14 not older ones. The
workaround is in EXODIST/Test2-0.000035-TRIAL.tar.gz. It can be
enforced by setting the environment variable T2_CHECK_DEPTH=1. So
older perls can run

  T2_CHECK_DEPTH=1 make test

in order to pass all Storable tests.

There is a contrived workaround for blessed.t itself. It avoids
triggering the bug by changing compilation order. I didn't understand
the birdies' explanation on the inner workings of this solution. Here
it is:

% diff -U1 t/blessed.t{~,}
--- t/blessed.t~        2018-01-30 20:44:59.935027614 +0000
+++ t/blessed.t 2018-01-30 20:51:01.133495863 +0000
@@ -18,4 +18,2 @@
 
-use Test::More;
-
 use Storable qw(freeze thaw store retrieve);
@@ -28,2 +26,4 @@
 
+use Test::More;
+
 {

If the patch would be applied, we could get rid of an inconvenience
for everybody who taps into this test failure with old perls in the
future.

-- 
andreas


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About