Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I had not found the test failure listed below yet on GitHub Issues. Has anyone else seen the below?

I had downloaded perl 5.38 from CPAN on RockyLinux 8.8 host:

uname -a Linux <HOST> 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 22:15:39 U +TC 2023 x86_64 x86_64 x86_64 GNU/Linux

Four tests related to opening/creating a file had failed (3 are of same kind in cpan directory); command used in zsh:

./Configure -des -Dprefix='/some/dir/perl' \ -Dusesitecustomize -Duserelocatableinc \ && make \ && make test \ && make install

Command used to run each failed test after build in t directory was

../perl -I../lib harness <test-file>

Failing tests:

../cpan/ExtUtils-Install/t/Packlist.t .. 1/35 # Failed test 'write() should croak on open failure' # at t/Packlist.t line 92. # '' # doesn't match '(?^:Can't open file)' # Looks like you failed 1 test of 35. ../cpan/ExtUtils-Install/t/Packlist.t .. Dubious, test returned 1 (wst +at 256, 0x100) Failed 1/35 subtests ../cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t .. 1/18 # Failed test 'should die given bad filename' # at t/Mkbootstrap.t line 84. # '' # doesn't match '(?^:Unable to open dasboot\.bs)' # Looks like you failed 1 test of 18. ../cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t .. Dubious, test returned 1 + (wstat 256, 0x100) Failed 1/18 subtests ../cpan/ExtUtils-Manifest/t/Manifest.t .. 45/98 # Failed test 'maniadd() dies if it can't open the MANIFEST' # at t/Manifest.t line 468. # '' # doesn't match '(?^:^maniadd\(\)\ could\ not\ open\ MANIFEST\:)' # Looks like you failed 1 test of 98. ../cpan/ExtUtils-Manifest/t/Manifest.t .. Dubious, test returned 1 (ws +tat 256, 0x100) Failed 1/98 subtests - cpan/IO-Compress/t/cz-14gzopen.t : not-undef is returned. ../perl -I../lib harness ../cpan/IO-Compress/t/cz-14gzopen.t ../cpan/IO-Compress/t/cz-14gzopen.t .. 89/264 # Failed test ' gzopen returns undef (returned: <Compress::Zlib::gz +File=ARRAY(0x1c635a8)>)' # at t/cz-14gzopen.t line 506. # Failed test ' gzerrno ok' # at t/cz-14gzopen.t line 507. # gzerrno 0 # Looks like you failed 2 tests of 264. ../cpan/IO-Compress/t/cz-14gzopen.t .. Dubious, test returned 2 (wstat + 512, 0x200) Failed 2/264 subtests
Summary of my perl5 (revision 5 version 38 subversion 0) configuration +: Platform: osname=linux osvers=4.18.0-477.13.1.el8_8.x86_64 archname=x86_64-linux uname='linux stefanh.ifa.hawaii.edu 4.18.0-477.13.1.el8_8.x86_64 # +1 smp tue may 30 22:15:39 utc 2023 x86_64 x8> config_args='-des -Dprefix=/some/dir/perl -Dusesitecustomize -Duse +relocatableinc' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-str +ong -I/usr/local/include -D_LARGEFILE_SOURCE> optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-str +ong -I/usr/local/include' ccversion='' gccversion='8.5.0 20210514 (Red Hat 8.5.0-18)' 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 /usr/lib64 /usr/local/lib64 libs=-lpthread -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc libc=libc-2.28.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.28' 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_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_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Built under linux Compiled at Jul 24 2023 14:15:13 @INC: ../lib /some/dir/download/lib/site_perl/5.38.0/x86_64-linux /some/dir/download/lib/site_perl/5.38.0 /some/dir/download/lib/5.38.0/x86_64-linux /some/dir/download/lib/5.38.0

Replies are listed 'Best First'.
Re: perl 5.38 - File open test failures on RockyLinux 8.8
by Corion (Patriarch) on Jul 25, 2023 at 07:37 UTC

    All those tests are filesystem-related. Is the filesystem you are building on somehow non-standard?

    This is a long shot, since I would expect far more tests to fail if your filesystem were weird, but maybe you are building on a network filesystem (AFS, NFS, ...) which behaves weird.

    Other than that, it is weird that only some of the tests that create/check files fail and the basic ones seem to pass.

    One thing that comes to mind when looking at ExtUtils::Install/Packlist.t:

    # set this file to read-only chmod 0444, 'eplist'; ... eval { ExtUtils::Packlist::write({}, 'eplist') };

    If you are running the tests as root or some other kind of superuser, the test will pass, as file permissions don't apply to root.

      I had run all the commands as mere-mortal user, nor do I have any intention to run them as root.

      Ah, yes, NFS! Thanks for bringing that up. (Unless something weird happens, do not notice the file system that is NFS.) User directories are available over NFSv4, where I was building|testing the things; will try on a local disk (ext4).

      Tests passed when (built &) tested directly on RockyLinux 8.8 ext4; OpenZFS 2.1.4 (FreeBSD 13.1-RELEASE-p8 zfs-2.1.4-FreeBSD_g52bad4f23) & 2.2.0 (FreeBSD 14-CURRENT zfs-2.2.0-FreeBSD_g009d3288) file systems.

      Cannot say what would happen on ZFS of the FreeBSD 12 server that exports the directory over NFSv4 (as do not have a set up laying around, nor am I in(v|ter)ested enough to bother with a virtual machine).

      Hello everyone,

      I am experiencing the same errors and some more:

      op/stat.t (Ws +tat: 0 Tests: 111 Failed: 1) Failed test: 91 ../cpan/ExtUtils-Install/t/can_write_dir.t (Ws +tat: 512 (exited 2) Tests: 12 Failed: 2) Failed tests: 7-8 Non-zero exit status: 2 ../cpan/ExtUtils-Install/t/Packlist.t (Ws +tat: 256 (exited 1) Tests: 35 Failed: 1) Failed test: 18 Non-zero exit status: 1 ../cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t (Ws +tat: 256 (exited 1) Tests: 18 Failed: 1) Failed test: 8 Non-zero exit status: 1 ../cpan/ExtUtils-Manifest/t/Manifest.t (Ws +tat: 256 (exited 1) Tests: 98 Failed: 1) Failed test: 93 Non-zero exit status: 1 ../cpan/IO-Compress/t/cz-14gzopen.t (Ws +tat: 1024 (exited 4) Tests: 264 Failed: 4) Failed tests: 182-183, 185-186 Non-zero exit status: 4 ../ext/POSIX/t/termios.t (Ws +tat: 1536 (exited 6) Tests: 1655 Failed: 6) Failed tests: 98, 100, 1649, 1651, 1653, 1655 Non-zero exit status: 6
      during compilation of perl 5.38.2 using perlbrew on AFS filesystem (Auristor 2021.05)

      Compiling locally (CentOS7 and RHEL9) works fine, though. AFS ACLs are set diffenrently and do not use the local FS calls, thus it comes to my mind it could be worth pondering on an environment variable, which states during compilation time, that the underlying FS is non-standard, so the tests may be skipped or the variable evaluated and other test might be run. Whoever is willing to implement that...

        If you review the output of ./Configure, it should detect that it is running under AFS.

        Maybe people have not build Perl on AFS for a long time.

Re: perl 5.38 - File open test failures on RockyLinux 8.8
by Anonymous Monk on Jul 25, 2023 at 05:23 UTC
    ../cpan/IO-Compress/t/cz-14gzopen.t .. 89/264 # Failed test ' gzopen returns undef (returned: <Compress::Zlib::gz +File=ARRAY(0x1c635a8)>)' # at t/cz-14gzopen.t line 506.

    I had edited cz-14gzopen.t to show the returned value of $fil as I was bit annoyed it itself did not unlike 3 other tests.