TEST 09_roundtrip.t fails in 5.40.0 RELEASE
Incredibly similar to https://github.com/Perl/perl5/issues/21233
However this is a really trivial Linux machine on AMD64 and nothing even remotely interesting about it. There is no Microsoft SystemD on this machine as it is based on the Devuan distro goodness. It runs nothing at all other than NTPd and the SSHd daemons. I use it for baseline testing.
To begin with we have to get the perl -V stuff :
io$ pwd
/opt/bw/build/perl-5.40.0_amd64_linux.002
io$ echo $LD_LIBRARY_PATH
/opt/bw/build/perl-5.40.0_amd64_linux.002
io$
io$ ls -lapb ./libperl.so
-rwxr-xr-x 1 dclarke devl 7682376 Jun 23 07:09 ./libperl.so
io$
io$ ls -lapb ./perl
-rwxr-xr-x 1 dclarke devl 33312 Jun 23 07:09 ./perl
io$
io$ ./perl -V
Can't locate Config.pm in @INC (you may need to install the Config module) (@INC entries checked: /opt/bw/lib/perl5/site_perl/5.40.0/x86_64-linux-ld /opt/bw/lib/perl5/site_perl/5.40.0 /opt/bw/lib/perl5/5.40.0/x86_64-linux-ld /opt/bw/lib/perl5/5.40.0).
BEGIN failed--compilation aborted.
io$
So that is annoying. The only way to get that info is to actually do the install of the broken perl that can not pass a testsuite.
OKay so then I backup the affected destination area and then install and we see :
io$
io$ which perl
/opt/bw/bin/perl
io$ ldd /opt/bw/bin/perl
linux-vdso.so.1 (0x00007f6f83df0000)
libperl.so => /opt/bw/lib/perl5/5.40.0/x86_64-linux-ld/CORE/libperl.so (0x00007f6f83800000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6f83cff000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f6f83cc3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6f8361b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6f83df2000)
io$
io$ perl -V
Summary of my perl5 (revision 5 version 40 subversion 0) configuration:
Platform:
osname=linux
osvers=6.9.5-genunix
archname=x86_64-linux-ld
uname='linux io 6.9.5-genunix #1 smp wed jun 19 03:59:56 gmt 2024 x86_64 gnulinux '
config_args='-Dprefix=/opt/bw -Dmksymlinks -Accflags=-m64 -g -O0 -fno-builtin -march=k8 -mtune=k8 -fno-fast-math -mno-fancy-math-387 -malign-double -m128bit-long-double -mstackrealign -mpreferred-stack-boundary=8 -L/opt/bw/lib -I/opt/bw/include -Wl,-rpath=/opt/bw/lib,-enable-new-dtags'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=define
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='/opt/bw/bin/gcc'
ccflags ='-m64 -g -O0 -fno-builtin -march=k8 -mtune=k8 -fno-fast-math -mno-fancy-math-387 -malign-double -m128bit-long-double -mstackrealign -mpreferred-stack-boundary=8 -L/opt/bw/lib -I/opt/bw/include -Wl,-rpath=/opt/bw/lib,-enable-new-dtags -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-g -O0'
cppflags='-m64 -g -O0 -fno-builtin -march=k8 -mtune=k8 -fno-fast-math -mno-fancy-math-387 -malign-double -m128bit-long-double -mstackrealign -mpreferred-stack-boundary=8 -L/opt/bw/lib -I/opt/bw/include -Wl,-rpath=/opt/bw/lib,-enable-new-dtags -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion=''
gccversion='14.1.0'
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='long double'
nvsize=16
Off_t='off_t'
lseeksize=8
alignbytes=16
prototype=define
Linker and Libraries:
ld='/opt/bw/bin/gcc'
ldflags =' -fstack-protector-strong'
libpth=/opt/bw/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=/lib/x86_64-linux-gnu/libc.so.6
so=so
useshrplib=true
libperl=libperl.so
gnulibc_version='2.38'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E -Wl,-rpath,/opt/bw/lib/perl5/5.40.0/x86_64-linux-ld/CORE'
cccdlflags='-fPIC'
lddlflags='-shared -g -O0 -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_LONG_DOUBLE
USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Jun 24 2024 06:28:12
%ENV:
PERL_DEBUG_FULL_TEST="1"
PERL_TEST_MEMORY="4"
@INC:
/opt/bw/lib/perl5/site_perl/5.40.0/x86_64-linux-ld
/opt/bw/lib/perl5/site_perl/5.40.0
/opt/bw/lib/perl5/5.40.0/x86_64-linux-ld
/opt/bw/lib/perl5/5.40.0
io$
Then we get to the tests that fail wherein I did run the testsuite over and over with a few different env vars set as per documentation. Just to see if a few of the longer tests would run. They did. Some of them.
In the ./t directory I did run the ../perl harness procedure with a few env vars set :
AUTHOR_TESTING=1
LD_LIBRARY_PATH=/opt/bw/build/perl-5.40.0_amd64_linux.002
PERL_DEBUG_FULL_TEST=1
PERL_TEST_MEMORY=4
Before anyone asks about the "AUTHOR_TESTING=1" suffice it to say that nothing else seemed to make a difference so why not give it a whirl? It made no difference in the test results. The same tests fail over and over :
Test Summary Report
-------------------
../cpan/Archive-Tar/t/09_roundtrip.t (Wstat: 1280 (exited 5) Tests: 8 Failed: 5)
Failed tests: 4-8
Non-zero exit status: 5
../cpan/Pod-Simple/t/corpus.t (Wstat: 3328 (exited 13) Tests: 1 Failed: 0)
Non-zero exit status: 13
Parse errors: Bad plan. You planned 59 tests but ran 1.
../cpan/Pod-Simple/t/htmlbat.t (Wstat: 3328 (exited 13) Tests: 1 Failed: 0)
Non-zero exit status: 13
Parse errors: Bad plan. You planned 15 tests but ran 1.
Files=2898, Tests=4049246, 12037 wallclock secs (2742.46 usr 115.04 sys + 10482.65 cusr 468.10 csys = 13808.25 CPU)
Result: FAIL
Finished test run at Tue Jun 25 17:22:20 2024.
real 12056.87
user 13230.94
sys 584.38
io$
There we see the "09_roundtrip.t" fails. Again. Same as in bug #21233. So that is not new. The other two are new ones however I am guessing it is because I always build perl "out of tree" in a separate build directory.
---------------------------------------------------------------------
bork bork bork TEST 09_roundtrip.t FAILS
---------------------------------------------------------------------
# Failed test 'src/long/bar.tar roundtrip on file names'
# at t/09_roundtrip.t line 229.
# Structures begin differing at:
# $got->[2] = 'directory'
# $expected->[2] = 'directory/'
# Failed test 'src/long/prefix-directory-concat.tar roundtrip on file names'
# at t/09_roundtrip.t line 229.
# Structures begin differing at:
# $got->[0] = 'directory-that-fits-into-the-tar-name-field-but-will-be-put-into-prefix-for-subdirectories-or-files'
# $expected->[0] = 'directory-that-fits-into-the-tar-name-field-but-will-be-put-into-prefix-for-subdirectories-or-files/'
gnutar: Invalid blocksize 9729 bytes.
gnutar: Success. Sync pipe read error pid 20242 ret 0
gnutar: Success. Ib 0 Ob 1 e 0 p 0 g 10 chan 5.
gnutar: Success. Sync pipe EOF error pid 20242 ret 0
# Failed test 'Failed running 'gnutar tvf src/linktest/linktest_with_dir.tar''
# at t/09_roundtrip.t line 192.
# Failed test 'src/long/foo.tgz roundtrip on file names'
# at t/09_roundtrip.t line 229.
# Structures begin differing at:
# $got->[2] = 'directory'
# $expected->[2] = 'directory/'
# Failed test 'src/long/foo.tbz roundtrip on file names'
# at t/09_roundtrip.t line 229.
# Structures begin differing at:
# $got->[2] = 'directory'
# $expected->[2] = 'directory/'
# Looks like you failed 5 tests of 8.
../cpan/Archive-Tar/t/09_roundtrip.t .................................
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/8 subtests
So that is a familiar failure.
Other oddball things I see that make me curious about the really large memory tests :
../dist/Storable/t/freeze.t .......................................... ok
# skip huge array, need PERL_TEST_MEMORY >= 55
# skip huge hash, need PERL_TEST_MEMORY >= 96
# building test input: huge string
# running test: huge string
# building test input: array with huge element
# running test: array with huge element
# building test input: hash with huge value
# running test: hash with huge value
../dist/Storable/t/huge.t ............................................ ok
I guess I need to run those on a much larger machine with buckets of memory installed. In fact, wow, perhaps a machine with at least 128G of memory or more.
OKay .. next issues are likely due to permissions.
---------------------------------------------------------------------
bork bork bork TEST corpus.t FAILS
---------------------------------------------------------------------
Can't write-open /opt/bw/build/perl-5.40.0/cpan/Pod-Simple/t/corpus/2202jp.xml_out: Permission denied
# Looks like your test exited with 13 just after 1.
../cpan/Pod-Simple/t/corpus.t ........................................
Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 58/59 subtests
I suspect this is because I always build perl "out of tree" and the actual pristine sources from the tarball are always extracted as root. That means that the sources can not be mangled by anyone or any process. Seems to work great with things like GCC where nothing will attempt to bork around with the source tree during a build or test.
Not so with PERL ?
---------------------------------------------------------------------
bork bork bork TEST htmlbat.t FAILS
---------------------------------------------------------------------
Can't mkdir /opt/bw/build/perl-5.40.0/cpan/Pod-Simple/t/delme-c7c40-out: Permission denied at t/htmlbat.t line 42.
# Looks like your test exited with 13 just after 1.
../cpan/Pod-Simple/t/htmlbat.t .......................................
Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 14/15 subtests
Yep. Looks like the PERL testsuite wants to bork around with the actual source tree as opposed to using the build directory. That can not be a good way to do things.
So there ya have it.
Also ... what is this RELEASE_TESTING thing ?
../cpan/autodie/t/version.t .......................................... skipped: Release test. Set $ENV{RELEASE_TESTING} to true to run.
Sounds like a good item to test.
-- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken
So that is annoying. The only way to get that info is to actually do the install of the broken perl that can not pass a testsuite.
You can do `./perl -Ilib -V
I suspect this is because I always build perl "out of tree" and the actual pristine sources from the tarball are always extracted as root. That means that the sources can not be mangled by anyone or any process. Seems to work great with things like GCC where nothing will attempt to bork around with the source tree during a build or test.
Not so with PERL ?
I would consider that a bug. It's in a contributed module though, it should be fixed upstream.
(Original post edited to distinguish code blocks from text.)
This ticket reports test failures in several different files. Problems with the following tests should first be reported upstream:
../cpan/Archive-Tar/t/09_roundtrip.t
at https://rt.cpan.org/Dist/Display.html?Name=Archive-Tar
../cpan/Pod-Simple/t/corpus.t
../cpan/Pod-Simple/t/htmlbat.t
at https://github.com/perl-pod/pod-simple/issues
If there's no satisfactory resolution upstream, you can re-file an issue here.
There is no real problem with the following test:
../cpan/autodie/t/version.t
The upstream maintainer is merely indicating that this test only needs to be run by the maintainer when preparing a CPAN release.
The following test file is the only one directly under the control of the maintainers of the Perl core distribution (Perl 5 Porters):
../dist/Storable/t/huge.t
The test file runs no tests if the user has not set the envvar PERL_TEST_MEMORY at all or only to a value of 4 or less. The file probably should do a better job of skipping tests that require much larger quantities of memory even when PERL_TEST_MEMORY has been defined by the user. Patches welcome.