Skip to content

VS2022 Test op/magic.t, uni/gv.t, ext/POSIX/t/time.t failure in perl 5.37.4 on Windows 8.1 #20373

@twata1

Description

@twata1

Description

Hello,

I'am building Perl 5.37.4 on Windows 8.1 64 bit using Visual Studio 2022 Community Edition (Microsoft(R) C/C++ Optimizing Compiler Version 19.33.31630 for x64).

The compilation itself succeeds, although there are some warnings, such as C4244 and C4267.
Several tests fail when running nmake test.

C:\VCPerl64\perl-5.37.4\win32>nmake

(snip)

        if exist ..\..\lib\auto\threads\shared\shared.dll.manifest mt -nologo -manifest ..\..\lib\auto\threads\shared\shared.dll.manifest -outputresource:..\..\lib\auto\threads\shared\shared.dll;2
        if exist ..\..\lib\auto\threads\shared\shared.dll.manifest del ..\..\lib\auto\threads\shared\shared.dll.manifest        "C:\VCPerl64\perl-5.37.4\miniperl.exe" "-I..\..\lib" -MExtUtils::Command -e chmod -- 755 ..\..\lib\auto\threads\shared\shared.dll
Everything is up to date. 'nmake test' to run test suite.

C:\VCPerl64\perl-5.37.4\win32>nmake test

(snip)

Test Summary Report
-------------------
op/magic.t                                                         (Wstat: 0 Tests: 208 Failed: 4)
  Failed tests:  190, 193, 197, 199
uni/gv.t                                                           (Wstat: 0 Tests: 206 Failed: 1)
  Failed test:  78
../dist/Net-Ping/t/450_service.t                                   (Wstat: 0 Tests: 26 Failed: 0)
  TODO passed:   9
../ext/IPC-Open3/t/IPC-Open3.t                                     (Wstat: 0 Tests: 45 Failed: 0)
  TODO passed:   25
../ext/POSIX/t/time.t                                              (Wstat: 512 (exited 2) Tests: 19 Failed: 2)
  Failed tests:  9-10
  Non-zero exit status: 2
Files=2730, Tests=1119663, 4274 wallclock secs (94.50 usr + 13.05 sys = 107.55 CPU)
Result: FAIL
NMAKE : fatal error U1077: '.\perl.exe' : return code '0x7'
Stop.

C:\VCPerl64\perl-5.37.4\win32>cd ..\t

C:\VCPerl64\perl-5.37.4\t>.\perl.exe harness op\magic.t
op/magic.t .. 182/208 # Failed test 190 - ENV store takes utf8-encoded key in se
tenv at op/magic.t line 75
#      got ''
# expected /(?^:^(?:X\-Day\ \a\|\?=)?widekey$)/
Use of uninitialized value in substitution (s///) at op/magic.t line 73.
# Failed test 193 - ENV store encodes high utf8 in SV at op/magic.t line 75
#      got ''
# expected /(?^:^(?:foo=)?X\-Day\ \a\|\?$)/
Use of uninitialized value in substitution (s///) at op/magic.t line 73.
Use of uninitialized value in substitution (s///) at op/magic.t line 73.
# Failed test 197 - at op/magic.t line 75
#      got ''
# expected /(?^:^(?:__NoNeSuCh=)?foo$)/
Use of uninitialized value in substitution (s///) at op/magic.t line 73.
# Failed test 199 - at op/magic.t line 75
#      got ''
# expected /(?^:^(?:__NoNeLoCaL=)?foo$)/
Use of uninitialized value in substitution (s///) at op/magic.t line 73.
op/magic.t .. Failed 4/208 subtests
        (less 13 skipped subtests: 191 okay)

Test Summary Report
-------------------
op/magic.t (Wstat: 0 Tests: 208 Failed: 4)
  Failed tests:  190, 193, 197, 199
Files=1, Tests=208,  8 wallclock secs ( 0.06 usr +  0.00 sys =  0.06 CPU)
Result: FAIL

C:\VCPerl64\perl-5.37.4\t>.\perl.exe harness uni\gv.t
uni/gv.t .. 1/206 Unrecognized character \x{3101}; marked by <-- HERE after less \$╚║::<-- HERE near column 24 at -e line 8.
# Failed test 78 - DESTROY was called at uni/gv.t line 319
#      got ''
# expected /(?^u:^Farewell ᴹ=SCALAR)/
uni/gv.t .. Failed 1/206 subtests

Test Summary Report
-------------------
uni/gv.t (Wstat: 0 Tests: 206 Failed: 1)
  Failed test:  78
Files=1, Tests=206,  0 wallclock secs ( 0.05 usr +  0.00 sys =  0.05 CPU)
Result: FAIL

C:\VCPerl64\perl-5.37.4\t>.\perl.exe harness ..\ext\POSIX\t\time.t
../ext/POSIX/t/time.t .. 1/19
#   Failed test 'strftime() can handle unicode chars in the format string'
#   at t/time.t line 70.
Wide character in print at ../../lib/Test2/Formatter/TAP.pm line 125.
#          got: '1970年01朁Ed日'
#     expected: '1970年01月16日'

#   Failed test 'strftime() can handle unicode chars in the format string'
#   at t/time.t line 73.
Wide character in print at ../../lib/Test2/Formatter/TAP.pm line 125.
#          got: '1970年01朁Ed日'
#     expected: '1970年01月16日'
# Looks like you failed 2 tests of 19.
../ext/POSIX/t/time.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/19 subtests
        (less 2 skipped subtests: 15 okay)

Test Summary Report
-------------------
../ext/POSIX/t/time.t (Wstat: 512 (exited 2) Tests: 19 Failed: 2)
  Failed tests:  9-10
  Non-zero exit status: 2
Files=1, Tests=19,  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
Result: FAIL

C:\VCPerl64\perl-5.37.4\t>

Steps to Reproduce

Download perl-5.37.4.tar.gz from metacpan(https://metacpan.org/release/ETHER/perl-5.37.4).
Extract from perl-5.37.4.tar.gz to C:\VCPerl64.
Open C:\VCPerl64\perl-5.37.4\win32\Makefile in your editor and edit as follows.

# Visual C++ 2022 (aka Visual C++ 14.3) (full version or Community Edition)
CCTYPE		= MSVC143
INST_TOP	= $(INST_DRV)\VCPerl64
INST_VER	= \5.37.4

Launch "x64 Native Tools Command Prompt for VS 2022" from the Start menu.
(Note: I run mode con cp select=437 on "x64 Native Tools Command Prompt for VS 2022" for English output.
I have already confirmed that code page 1252 or 932 fails in the same place.)

On that Command Prompt, run the following.

cd C:\VCPerl64\perl-5.37.4\win32
nmake

After nmake is finished , run nmake test on the same x64 Native Tools Command Prompt for VS 2022.

Expected behavior

No tests failure.

Perl configuration

C:\VCPerl64\perl-5.37.4>perl -V
Summary of my perl5 (revision 5 version 37 subversion 4) configuration:
   
  Platform:
    osname=MSWin32
    osvers=6.3.9600
    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='cl'
    ccflags ='-nologo -GF -W3 -MD -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS  -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS'
    optimize='-O1 -Zi -GL -fp:precise'
    cppflags='-DWIN32'
    ccversion='19.33.31630'
    gccversion=''
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=undef
    longlongsize=8
    d_longdbl=define
    longdblsize=8
    longdblkind=0
    ivtype='__int64'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='__int64'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='link'
    ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\VCPerl64\5.37.4\lib\CORE"  -machine:AMD64 -subsystem:console,"5.02"'
    libpth="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\\lib\x64"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib
    libc=ucrt.lib
    so=dll
    useshrplib=true
    libperl=perl537.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\VCPerl64\5.37.4\lib\CORE"  -machine:AMD64 -subsystem:console,"5.02"'


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_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_SAFE_PUTENV
    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_THREAD_SAFE_LOCALE
  Built under MSWin32
  Compiled at Oct  8 2022 21:31:26
  @INC:
    C:/VCPerl64/perl-5.37.4/lib

C:\VCPerl64\perl-5.37.4>

Thank you,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions