ingydotnet / test-base-pm

Extendable Perl Testing
http://search.cpan.org/dist/Test-Base/
13 stars 12 forks source link

Broken by latest test builder alphas, not sure why #13

Closed exodist closed 10 years ago

exodist commented 10 years ago
$ prove -Ilib -v test/diff_is.t
test/diff_is.t .. 
1..1
not ok 1 - little diff

#   Failed test 'little diff'
#   at /home/exodist/projects/test-base-pm/lib/Test/Base.pm line 259.
# @@ -1,7 +1,7 @@
#  1..1
#  not ok 1 - little diff
#  #   Failed test 'little diff'
# -#   at /tmp/test-blocks-321 line 3.
# +#   at lib/Test/Base.pm line 255.
#  #          got: 'a b c'
#  #     expected: 'a b x'
#  # 1 test of 1 failed.
# Looks like you failed 1 test of 1.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Test Summary Report
-------------------
test/diff_is.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.09 cusr  0.00 csys =  0.10 CPU)
Result: FAIL

Using Test::Builder - https://metacpan.org/release/EXODIST/Test-Simple-1.301001_022

exodist commented 10 years ago

Summary of my perl5 (revision 5 version 20 subversion 0) configuration:

Platform: osname=linux, osvers=3.13.0-24-generic, archname=x86_64-linux-thread-multi uname='linux work 3.13.0-24-generic #47-ubuntu smp fri may 2 23:30:00 utc 2014 x86_64 x86_64 x86_64 gnulinux ' config_args='-de -Dprefix=/home/exodist/perl5/perlbrew/perls/test-5.20.0 -Dusethreads -Aeval:scriptdir=/home/exodist/perl5/perlbrew/perls/test-5.20.0/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -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 -I/usr/local/include' ccversion='', gccversion='4.8.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 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 -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/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 libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' 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'

Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE 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_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Aug 6 2014 08:50:06 %ENV: PERLBREW_BASHRC_VERSION="0.66" PERLBREW_HOME="/home/exodist/.perlbrew" PERLBREW_MANPATH="/home/exodist/perl5/perlbrew/perls/test-5.20.0/man" PERLBREW_PATH="/home/exodist/perl5/perlbrew/bin:/home/exodist/perl5/perlbrew/perls/test-5.20.0/bin" PERLBREW_PERL="test-5.20.0" PERLBREW_ROOT="/home/exodist/perl5/perlbrew" PERLBREW_VERSION="0.66" @INC: /home/exodist/perl5/perlbrew/perls/test-5.20.0/lib/site_perl/5.20.0/x86_64-linux-thread-multi /home/exodist/perl5/perlbrew/perls/test-5.20.0/lib/site_perl/5.20.0 /home/exodist/perl5/perlbrew/perls/test-5.20.0/lib/5.20.0/x86_64-linux-thread-multi /home/exodist/perl5/perlbrew/perls/test-5.20.0/lib/5.20.0 .

ingydotnet commented 10 years ago

Ok I figured this out some. See https://gist.github.com/fd2164230aea231419b9

If you run this with or without the use lib then you get different results.

Test::Base redefines is and needs a way to tell Test::Builder to use a different call-stack frame.

@exodist, can you tell me which to use?

ingydotnet commented 10 years ago

Fixed by #14