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

[perl #133382] Test::Simple 1.302138 generating new warnings whentesting Thread-Queue in threaded builds

Thread Next
From:
James E Keenan
Date:
July 16, 2018 20:16
Subject:
[perl #133382] Test::Simple 1.302138 generating new warnings whentesting Thread-Queue in threaded builds
Message ID:
rt-4.0.24-9460-1531772174-848.133382-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #133382]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133382 >


Today I had occasion to configure Perl 5 blead with threads at commit 
238217e5c236e02bb182c3f6f8cf2a0a86e5e7db.  As I ran the test harness, I 
observed output like this:

#####
../dist/Thread-Queue/t/01_basic.t .................................. ok
Too late to run INIT block at ../../lib/Test2/IPC.pm line 22.
../dist/Thread-Queue/t/02_refs.t ................................... ok
Too late to run INIT block at ../../lib/Test2/IPC.pm line 22.
../dist/Thread-Queue/t/03_peek.t ................................... ok
../dist/Thread-Queue/t/04_errs.t ................................... ok
Too late to run INIT block at ../../lib/Test2/IPC.pm line 22.
../dist/Thread-Queue/t/05_extract.t ................................ ok
Too late to run INIT block at ../../lib/Test2/IPC.pm line 22.
../dist/Thread-Queue/t/06_insert.t ................................. ok
Too late to run INIT block at ../../lib/Test2/IPC.pm line 22.
../dist/Thread-Queue/t/07_lock.t ................................... ok
...
#####

When I build a threaded Perl from tag v5.28.0 and ran these tests, I did 
not get any of the "Too late to run INIT block" warnings.

There have been no changes to Thread-Queue in more than a year, so 
that's not the cause of the problem.

My hunch is that the problem comes from this commit:

#####
commit 75d3e525390a7acfd95b0fc94e41aeb4af6587d4
Author:     Steve Hay <steve.m.hay@googlemail.com>
AuthorDate: Mon Jul 16 03:55:18 2018
Commit:     Steve Hay <steve.m.hay@googlemail.com>
CommitDate: Mon Jul 16 03:55:18 2018

     Upgrade Test::Simple from version 1.302136 to 1.302138
#####

... as this commit contains these changes:

#####
75d3e525 (Steve Hay               2018-07-16 08:55:18 +0100  21) # Make 
sure stuff is finalized before an
yone tried to fork or start a new thread.
75d3e525 (Steve Hay               2018-07-16 08:55:18 +0100  22) INIT { 
context()->release() }
75d3e525 (Steve Hay               2018-07-16 08:55:18 +0100  23)
#####

There were no test failures ... but it would be good to diagnose the 
cause of those warnings and take steps to eliminate them.

Thank you very much.
Jim Keenan


Thread Next


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