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

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

From:
James E Keenan via RT
Date:
August 18, 2018 14:27
Subject:
[perl #133382] Test::Simple 1.302138 generating new warnings whentesting Thread-Queue in threaded builds
Message ID:
rt-4.0.24-1516-1534602433-433.133382-15-0@perl.org
On Wed, 18 Jul 2018 21:58:42 GMT, jkeenan wrote:
> On Wed, 18 Jul 2018 14:52:07 GMT, exodist7@gmail.com wrote:
> > Yesterday I uploaded a new TRIAL dist for Test-Simple that I believe
> > fixes
> > the problem, please verify, assuming it is good I can release it as
> > stable.
> >
> > On Tue, Jul 17, 2018 at 7:28 PM James E Keenan via RT <
> > perlbug-followup@perl.org> wrote:
> >
> > > On Tue, 17 Jul 2018 19:39:07 GMT, exodist7@gmail.com wrote:
> > > > I just pushed commit df089e827cb48d64099b75e08acd5a2a7bbeb7e4  to
> > > > the
> > > > Test-Simple github repo. I believe this will also eliminate the
> > > > warning.
> > > > The init block helps keep people from shooting their own foot,
> > > > but is
> > > > not
> > > > 100% essential, so the warning is not very useful here.
> > > >
> > > > -Chad
> > > >
> > > > On Tue, Jul 17, 2018 at 12:09 PM James E Keenan via RT <
> > > > perlbug-followup@perl.org> wrote:
> > > >
> > > > > On Tue, 17 Jul 2018 11:22:20 GMT, davem wrote:
> > > > > > On Mon, Jul 16, 2018 at 01:16:14PM -0700, James E Keenan (via
> > > > > > RT)
> > > > > > wrote:
> > > > > > > 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.
> > > > > >
> > > > > > Whether Test2 can be fixed/improved, I don't know, but all
> > > > > > those
> > > > > > test
> > > > > > scripts in Thread-Queue/t have the same boiler-plate:
> > > > > >
> > > > > > if ($] == 5.008) {
> > > > > >     require 't/test.pl';   # Test::More work-alike for Perl
> > > > > > 5.8.0
> > > > > > } else {
> > > > > >     require Test::More;
> > > > > > }
> > > > > > Test::More->import();
> > > > > >
> > > > > > The 'require' of Test::More is what is causing the 'too late'
> > > > > > warning.
> > > > > > The warnings can be trivially avoided by wrapping that block
> > > > > > in a
> > > > > > BEGIN,
> > > > > >
> > > > >
> > > > > I have submitted a patch to the upstream maintainer.
> > > > >
> > > > > Thank you very much.
> > > > > --
> > > > > James E Keenan (jkeenan@cpan.org)
> > > > >
> > > > > ---
> > > > > via perlbug:  queue: perl5 status: open
> > > > > https://rt.perl.org/Ticket/Display.html?id=133382
> > > > >
> > >
> > > Yes, it looks as if we will need some work on Test-Simple.  Jerry
> > > Hedden
> > > just supplied an updated version of Thread-Queue incorporating the
> > > BEGIN
> > > blocks in test files as suggested by Dave and patched by me
> > > earlier.  I
> > > applied it to blead, but as I was running 'make test_harness' I
> > > noticed
> > > these warnings in distributions *other* than Thread-Queue.
> > >
> > > #####
> > > ../dist/Term-ReadLine/t/Tk.t
> > > .......................................
> > > skipped: Tk is not installed.
> > > ===(  164188;210  10/12  0/?  0/?
> > > )=====================================Too late to run INIT block at
> > > ../../lib/Test2/IPC.pm line 22.
> > > ../dist/Thread-Semaphore/t/01_basic.t
> > > .............................. ok
> > > ../dist/Thread-Semaphore/t/02_errs.t
> > > ............................... ok
> > > ../dist/Thread-Semaphore/t/03_nothreads.t
> > > .......................... ok
> > > ../dist/Storable/t/code.t
> > > .......................................... ok
> > > ../dist/Storable/t/compat01.t
> > > ......................................
> > > skipped: Test only works for 32 bit little-ending machines
> > > ===(  164277;210  10/12   0/81  0/?
> > > )===================================Too late to run INIT block at
> > > ../../lib/Test2/IPC.pm line 22.
> > > ../dist/Storable/t/compat06.t
> > > ...................................... ok
> > > ../dist/Storable/t/croak.t
> > > ......................................... ok
> > > ../dist/Thread-Semaphore/t/04_nonblocking.t
> > > ........................ ok
> > > ===(  164299;210  10/12   0/81  0/?
> > > )===================================Too late to run INIT block at
> > > ../../lib/Test2/IPC.pm line 22.
> > > ../dist/Storable/t/CVE-2015-1592.t
> > > ................................. ok
> > > ../dist/Thread-Semaphore/t/05_force.t
> > > .............................. ok
> > > ../dist/Storable/t/dclone.t
> > > ........................................ ok
> > > ===(  164322;210  10/12   0/81  0/?
> > > )===================================Too late to run INIT block at
> > > ../../lib/Test2/IPC.pm line 22.
> > > ../dist/Storable/t/destroy.t
> > > ....................................... ok
> > > #####
> > >
> > > Thank you very much.
> > >
> > > --
> > > James E Keenan (jkeenan@cpan.org)
> > >
> > > ---
> > > via perlbug:  queue: perl5 status: open
> > > https://rt.perl.org/Ticket/Display.html?id=133382
> > >
> 
> Please see this smoke testing branch:
> 
> smoke-me/jkeenan/133382-Test-Simple-trial
> 
> I could not get Porting/sync_with_cpan to work properly with the
> --tarball option pointing to a tarball of this TRIAL version
> downloaded from the network.  So this branch represents a manual --
> and therefore possibly faulty -- synchronization.  Nonetheless, I
> could no longer find the string 'INIT' in the output of make
> test_harness.
> 
> Thank you very much.

Chad subsequently released Test-Simple-1.302140 to CPAN.  In a branch yesterday, I syched that into blead, built with threads and observed none of the warnings that were the subject of this ticket.  I then merged the branch into blead.  Smoke results look good, so I'm marking this ticket Resolved.

Thank you very much.
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133382



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