dagolden / Path-Tiny

File path utility
41 stars 59 forks source link

[Win32] Failing tests as of perl-5.33.5 onwards #238

Closed sisyphus closed 3 years ago

sisyphus commented 3 years ago

No problems with Path-Tiny-0.116 on perl-5.33.4 and earlier - irrespective of ivtype and nvtype. However, with perl-5.33.5, perl-5.33.6, and current blead (up to commit 01900a5f, at least) the test suite for Path-Tiny-0.116 is producing the following output:

"C:\perl-5.33.7-830\bin\MSWin32-x64-multi-thread\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
# 
# Versions for all modules listed in MYMETA.json (including optional ones):
# 
# === Configure Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker 6.17 7.58
# 
# === Configure Suggests ===
# 
#     Module      Want Have
#     -------- ------- ----
#     JSON::PP 2.27300 4.05
# 
# === Build Requires ===
# 
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 7.58
# 
# === Test Requires ===
# 
#     Module                Want     Have
#     --------------------- ---- --------
#     Digest::MD5            any     2.58
#     ExtUtils::MakeMaker    any     7.58
#     File::Basename         any     2.85
#     File::Spec            0.86     3.80
#     File::Spec::Functions  any     3.80
#     File::Spec::Unix       any     3.80
#     File::Temp            0.19   0.2311
#     Test::More            0.96 1.302183
#     lib                    any     0.65
#     open                   any     1.12
# 
# === Test Recommends ===
# 
#     Module                 Want     Have
#     ------------------ -------- --------
#     CPAN::Meta         2.120900 2.150010
#     Test::FailWarnings      any    0.008
#     Test::MockRandom        any     1.01
# 
# === Runtime Requires ===
# 
#     Module             Want   Have
#     ------------------ ---- ------
#     Carp                any   1.52
#     Cwd                 any   3.80
#     Digest             1.03   1.19
#     Digest::SHA        5.45   6.02
#     Encode              any   3.08
#     Exporter           5.57   5.76
#     Fcntl               any   1.14
#     File::Copy          any   2.35
#     File::Glob          any   1.33
#     File::Path         2.07   2.18
#     File::Spec         0.86   3.80
#     File::Temp         0.19 0.2311
#     File::stat          any   1.09
#     constant            any   1.33
#     overload            any   1.33
#     strict              any   1.12
#     warnings            any   1.51
#     warnings::register  any   1.04
# 
# === Runtime Recommends ===
# 
#     Module        Want    Have
#     ------------- ---- -------
#     Unicode::UTF8 0.58 missing
# 
t/00-report-prereqs.t ............. ok
t/basename.t ...................... ok
t/basic.t ......................... ok
t/children.t ...................... ok
t/chmod.t ......................... ok
t/digest.t ........................ ok
t/exception.t ..................... ok
t/exports.t ....................... ok
Error lstat on 'C:/Users/sisyphus/AppData/Local/Temp/d0EsF3cM_P/bar.txt': No such file or directory at t/filesystem.t line 348.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 80.
t/filesystem.t .................... 
Dubious, test returned 2 (wstat 512, 0x200)
All 80 subtests passed 
t/input_output.t .................. ok
t/input_output_no_PU_UU.t ......... ok
t/input_output_no_UU.t ............ ok
t/locking.t ....................... ok
t/mkpath.t ........................ ok
t/mutable_tree_while_iterating.t .. ok
t/normalize.t ..................... ok
t/overloading.t ................... ok
t/parent.t ........................ ok

            #   Failed test 'Don't follow symlinks'
            #   at t/recurse.t line 121.
            #     Structures begin differing at:
            #          $got->[7] = Does not exist
            #     $expected->[7] = 'pppp'
            # [
            #   'aaaa.txt',
            #   'bbbb.txt',
            #   'cccc',
            #   'gggg.txt',
            #   'cccc/dddd.txt',
            #   'cccc/eeee',
            #   'cccc/eeee/ffff.txt'
            # ]
            # Looks like you failed 1 test of 1.

        #   Failed test 'iterator'
        #   at t/recurse.t line 123.

            #   Failed test 'Don't follow symlinks'
            #   at t/recurse.t line 127.
            #     Structures begin differing at:
            #          $got->[7] = Does not exist
            #     $expected->[7] = 'pppp'
            # [
            #   'aaaa.txt',
            #   'bbbb.txt',
            #   'cccc',
            #   'gggg.txt',
            #   'cccc/dddd.txt',
            #   'cccc/eeee',
            #   'cccc/eeee/ffff.txt'
            # ]
            # Looks like you failed 1 test of 1.

        #   Failed test 'visit'
        #   at t/recurse.t line 129.
        # Looks like you failed 2 tests of 2.

    #   Failed test 'no follow'
    #   at t/recurse.t line 130.

            #   Failed test 'Follow symlinks'
            #   at t/recurse.t line 139.
            #     Structures begin differing at:
            #          $got->[7] = Does not exist
            #     $expected->[7] = 'pppp'
            # [
            #   'aaaa.txt',
            #   'bbbb.txt',
            #   'cccc',
            #   'gggg.txt',
            #   'cccc/dddd.txt',
            #   'cccc/eeee',
            #   'cccc/eeee/ffff.txt'
            # ]
            # Looks like you failed 1 test of 1.

        #   Failed test 'iterator'
        #   at t/recurse.t line 141.

            #   Failed test 'Follow symlinks'
            #   at t/recurse.t line 146.
            #     Structures begin differing at:
            #          $got->[7] = Does not exist
            #     $expected->[7] = 'pppp'
            # [
            #   'aaaa.txt',
            #   'bbbb.txt',
            #   'cccc',
            #   'gggg.txt',
            #   'cccc/dddd.txt',
            #   'cccc/eeee',
            #   'cccc/eeee/ffff.txt'
            # ]
            # Looks like you failed 1 test of 1.

        #   Failed test 'visit'
        #   at t/recurse.t line 148.
        # Looks like you failed 2 tests of 2.

    #   Failed test 'follow'
    #   at t/recurse.t line 149.
    # Looks like you failed 2 tests of 2.

#   Failed test 'with symlinks'
#   at t/recurse.t line 150.
# Looks like you failed 1 test of 2.
t/recurse.t ....................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 
    # No tests run!

#   Failed test 'No tests run for subtest "relative on absolute paths with symlinks"'
#   at t/rel-abs.t line 216.
Operation not permitted at t/rel-abs.t line 122.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 33.
t/rel-abs.t ....................... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/33 subtests 
t/sig_die.t ....................... ok
t/subsumes.t ...................... ok
    # No tests run!

#   Failed test 'No tests run for subtest "relative symlinks with updir"'
#   at t/symlinks.t line 31.
Failed to symlink: Operation not permitted
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 1.
t/symlinks.t ...................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests 
t/temp.t .......................... ok
t/visit.t ......................... ok
t/zz-atomic.t ..................... ok
t/zzz-spec.t ...................... ok

Test Summary Report
-------------------
t/filesystem.t                  (Wstat: 512 Tests: 80 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/recurse.t                     (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t/rel-abs.t                     (Wstat: 512 Tests: 33 Failed: 1)
  Failed test:  33
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/symlinks.t                    (Wstat: 65280 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=27, Tests=1728,  8 wallclock secs ( 0.22 usr +  0.09 sys =  0.31 CPU)
Result: FAIL
Failed 4/27 test programs. 3/1728 subtests failed.
make: *** [Makefile:908: test_dynamic] Error 255

These failures are occurring for all ivtype/nvtype combinations. On Win32, I run only perls built by mingw-w64 ports of gcc. Here is the 'perl -V' output for the one that produce the above 'make test' result:

Summary of my perl5 (revision 5 version 33 subversion 7) configuration:

  Platform:
    osname=MSWin32
    osvers=6.1.7601
    archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='gcc'
    ccflags =' -DWIN32 -DWIN64 -fdiagnostics-color=never -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='8.3.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"C:\perl-5.33.7-830\lib\MSWin32-x64-multi-thread\CORE" -L"C:\_64\gcc-straw-830\mingw64\lib" -L"C:\_64\gcc-straw-830\mingw64\x86_64-w64-mingw32\lib" -L"C:\_64\gcc-straw-830\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0"'
    libpth=C:\_64\gcc-straw-830\mingw64\lib C:\_64\gcc-straw-830\mingw64\x86_64-w64-mingw32\lib C:\_64\gcc-straw-830\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0 C:\_64\msys_830\1.0\local\lib
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl533.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"C:\perl-5.33.7-830\lib\MSWin32-x64-multi-thread\CORE" -L"C:\_64\gcc-straw-830\mingw64\lib" -L"C:\_64\gcc-straw-830\mingw64\x86_64-w64-mingw32\lib" -L"C:\_64\gcc-straw-830\mingw64\lib\gcc\x86_64-w64-mingw32\8.3.0"'

Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_IMPLICIT_CONTEXT
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    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
  Built under MSWin32
  Compiled at Jan 31 2021 12:31:47
  @INC:
    C:/perl-5.33.7-830/site/lib/MSWin32-x64-multi-thread
    C:/perl-5.33.7-830/site/lib
    C:/perl-5.33.7-830/lib/MSWin32-x64-multi-thread
    C:/perl-5.33.7-830/lib
xdg commented 3 years ago

This seems likely to be related to the 5.33.5 Windows symlink change.

xdg commented 3 years ago

@sisyphus I don't have a windows box handy to test. Would you mind trying the windows-symlinks branch and letting me know if that gets tests passing again?

sisyphus commented 3 years ago

No problem, @xdg. The windows-symlinks branch passes all tests. Looks good !! (The "master" branch fails, as reported earlier.)

xdg commented 3 years ago

Thank you very much!