houseabsolute / p5-Test-Vars

Detects unused variables in unit tests
https://metacpan.org/pod/Test::Vars
Other
6 stars 10 forks source link

t/03_warned.t fail on Perl 5.28 #37

Closed simon04 closed 6 years ago

simon04 commented 6 years ago
$ perl -V
Summary of my perl5 (revision 5 version 28 subversion 0) configuration:

  Platform:
    osname=linux
    osvers=4.17.11-arch1
    archname=x86_64-linux-thread-multi
    uname='linux flo-64s 4.17.11-arch1 #1 smp preempt sun jul 29 10:11:16 utc 2018 x86_64 gnulinux '
    config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/5.28/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/5.28/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/5.28/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dcccdlflags='-fPIC' -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
    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='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt'
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='8.1.1 20180531'
    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 ='-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64
    libs=-lpthread -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.27.so
    so=so
    useshrplib=true
    libperl=libperl.so
    gnulibc_version='2.27'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.28/core_perl/CORE'
    cccdlflags='-fPIC'
    lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -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
    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 Aug  1 2018 08:43:05
  @INC:
    /usr/lib/perl5/5.28/site_perl
    /usr/share/perl5/site_perl
    /usr/lib/perl5/5.28/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib/perl5/5.28/core_perl
    /usr/share/perl5/core_perl

$ prove -lr t/
t/00_load.t .............. 1/1 # Testing Test::Vars/0.014
t/00_load.t .............. ok   
t/01_all_vars_ok_self.t .. skipped: No MANIFEST ready
t/02_no_warnings.t ....... 1/? # Test::Vars ignores CompileError.pm because: Intentional compile error.
# Test::Vars ignores ImplicitTopic.pm because: Can't use global $_ in "my" at t/lib/ImplicitTopic.pm line 6, near "my $_ "
t/02_no_warnings.t ....... ok    
t/03_warned.t ............ 1/? 
#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '

#   Failed test 'failure message comes from inside this test file'
#   at t/03_warned.t line 44.
#          got: '   Failed test (/tmp/p5-Test-Vars/lib/Test/Vars.pm at line 76)
# '
#     expected: '   Failed test (t/03_warned.t at line 39)
# '
# Looks like you failed 7 tests of 28.
t/03_warned.t ............ Dubious, test returned 7 (wstat 1792, 0x700)
Failed 7/28 subtests 
t/04_ignores.t ........... ok   
t/05_test_vars.t ......... ok   
t/06_vars_ok_self.t ...... ok   
t/07_stub_sub_bug.t ...... skipped: This test requires Moose::Role
t/08_undef_aux_list.t .... skipped: This test requires Test::Output
t/09_array_slice.t ....... skipped: This test requires Moose::Role

Test Summary Report
-------------------
t/03_warned.t          (Wstat: 1792 Tests: 28 Failed: 7)
  Failed tests:  3, 7, 11, 15, 19, 23, 27
  Non-zero exit status: 7
Files=10, Tests=62,  0 wallclock secs ( 0.03 usr  0.02 sys +  0.59 cusr  0.11 csys =  0.75 CPU)
Result: FAIL
autarch commented 6 years ago

I don't think this has anything to do with 5.28.0. I just installed that locally and the tests pass fine.

autarch commented 6 years ago

What version of Test::Builder do you have installed?

simon04 commented 6 years ago

It seems to be a problem w/ my system. I cannot reproduce with the Docker images perl:5.28, base/archlinux. Sorry for the noise …