Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test::Simple 1.302138 generating new warnings when testing Thread-Queue in threaded builds #16635

Closed
p5pRT opened this issue Jul 16, 2018 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 16, 2018

Migrated from rt.perl.org#133382 (status was 'resolved')

Searchable as RT133382$

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2018

From @jkeenan

Today I had occasion to configure Perl 5 blead with threads at commit
238217e. 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 75d3e52
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​:

#####
75d3e52 (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.
75d3e52 (Steve Hay 2018-07-16 08​:55​:18 +0100 22) INIT {
context()->release() }
75d3e52 (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

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2018

From @jkeenan

Summary of my perl5 (revision 5 version 29 subversion 1) configuration​:
  Commit id​: 238217e
  Platform​:
  osname=linux
  osvers=4.4.0-130-generic
  archname=x86_64-linux-thread-multi
  uname='linux zareason 4.4.0-130-generic #156-ubuntu smp thu jun 14 08​:53​:28 utc 2018 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel -Duseithreads'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=define
  usemultiplicity=define
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='5.4.0 20160609'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.23.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.23'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  MULTIPLICITY
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_IMPLICIT_CONTEXT
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_ITHREADS
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  USE_REENTRANT_API
  Built under linux
  Compiled at Jul 16 2018 15​:50​:00
  %ENV​:
  PERL2DIR="/home/jkeenan/gitwork/perl2"
  PERLBREW_BASHRC_VERSION="0.78"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/bin"
  PERLBREW_PERL="perl-5.28.0"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_VERSION="0.78"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.29.1/x86_64-linux-thread-multi
  /usr/local/lib/perl5/site_perl/5.29.1
  /usr/local/lib/perl5/5.29.1/x86_64-linux-thread-multi
  /usr/local/lib/perl5/5.29.1

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @iabyn

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
238217e. 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,

--
No matter how many dust sheets you use, you will get paint on the carpet.

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @jkeenan

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
238217e. 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&#8203;::More work\-alike for Perl 5\.8\.0
\} else \{
    require Test&#8203;::More;
\}
Test&#8203;::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)

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @exodist

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
238217e. 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&#8203;::More work\-alike for Perl 5\.8\.0
\} else \{
    require Test&#8203;::More;
\}
Test&#8203;::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-archive.perl.org/perl5/Ticket/Display.html?id=133382

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @exodist

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
238217e. 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&#8203;::More work\-alike for Perl 5\.8\.0
\} else \{
    require Test&#8203;::More;
\}
Test&#8203;::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-archive.perl.org/perl5/Ticket/Display.html?id=133382

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @exodist

I also just uploaded v1.302139-TRIAL to cpan.

On Tue, Jul 17, 2018 at 12​:38 PM Chad Granum <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
238217e. 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&#8203;::More work\-alike for Perl 5\.8\.0
\} else \{
    require Test&#8203;::More;
\}
Test&#8203;::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-archive.perl.org/perl5/Ticket/Display.html?id=133382

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2018

From @exodist

I also just uploaded v1.302139-TRIAL to cpan.

On Tue, Jul 17, 2018 at 12​:38 PM Chad Granum <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
238217e. 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&#8203;::More work\-alike for Perl 5\.8\.0
\} else \{
    require Test&#8203;::More;
\}
Test&#8203;::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-archive.perl.org/perl5/Ticket/Display.html?id=133382

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2018

From @jkeenan

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
238217e. 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-archive.perl.org/perl5/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)

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2018

From @exodist

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
238217e. 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-archive.perl.org/perl5/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-archive.perl.org/perl5/Ticket/Display.html?id=133382

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2018

From @exodist

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
238217e. 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-archive.perl.org/perl5/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-archive.perl.org/perl5/Ticket/Display.html?id=133382

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2018

From @jkeenan

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
238217e. 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-archive.perl.org/perl5/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-archive.perl.org/perl5/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.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 18, 2018

From @jkeenan

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
238217e. 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-archive.perl.org/perl5/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-archive.perl.org/perl5/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)

@p5pRT
Copy link
Author

p5pRT commented Aug 18, 2018

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant