Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures on Windows with 8.3 filenames disabled #16804

Closed
p5pRT opened this issue Jan 7, 2019 · 25 comments
Closed

Test failures on Windows with 8.3 filenames disabled #16804

p5pRT opened this issue Jan 7, 2019 · 25 comments
Labels
Closable? We might be able to close this ticket, but we need to check with the reporter cpan-dual-life issues regarding dual-life cpan-first distributions distro-mswin32 hasPatch type-core

Comments

@p5pRT
Copy link

p5pRT commented Jan 7, 2019

Migrated from rt.perl.org#133754 (status was 'open')

Searchable as RT133754$

@p5pRT
Copy link
Author

p5pRT commented Jan 7, 2019

From @steve-m-hay

Created by @steve-m-hay

If I run the test suite on my C​: drive then all tests pass, but on my
D​: drive I get a bunch of failures​:

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t
(Wstat​: 2048 Tests​: 54 Failed​: 8)
  Failed tests​: 3, 9, 15, 21, 27, 33, 39, 45
  Non-zero exit status​: 8
../cpan/Win32/t/GetShortPathName.t
(Wstat​: 0 Tests​: 5 Failed​: 1)
  Failed test​: 2
../cpan/Win32/t/Unicode.t
(Wstat​: 0 Tests​: 11 Failed​: 8)
  Failed tests​: 1-3, 5, 8-11
  Parse errors​: Bad plan. You planned 12 tests but ran 11.
Files=2649, Tests=1100728, 2184 wallclock secs (73.52 usr + 10.45 sys
= 83.97 CPU)
Result​: FAIL

The difference seems to be that 8.3 filenames are disabled on my D​:
drive, as I can see using the fsutil.exe program​:

D​:\Dev\Git\perl>fsutil 8dot3name query C​:
The volume state is​: 0 (8dot3 name creation is enabled).
The registry state is​: 2 (Per volume setting - the default).

Based on the above settings, 8dot3 name creation is enabled on C​:

D​:\Dev\Git\perl>fsutil 8dot3name query D​:
The volume state is​: 1 (8dot3 name creation is disabled).
The registry state is​: 2 (Per volume setting - the default).

Based on the above settings, 8dot3 name creation is disabled on D​:

However, modifying the test scripts to check this for themselves isn't
easy because (a) fsutil.exe doesn't exist on all older versions of
Windows (I'm running Windows 10) and (b) even if fsutil.exe is
available it needs an Admin Command Prompt to run. In a normal Command
Prompt on the same machine I just get​:

D​:\Dev\Git\perl>fsutil 8dot3name query C​:
Error​: Access is denied.

D​:\Dev\Git\perl>fsutil 8dot3name query D​:
Error​: Access is denied.

It is possible to query the registry, but if (as on my system) the
setting has been made per-volume rather than globally on or off then
I'm not sure exactly which settings need querying​:

D​:\Dev\Git\perl>reg query
HKLM\System\CurrentControlSet\Control\FileSystem /v
NtfsDisable8dot3NameCreation

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
  NtfsDisable8dot3NameCreation REG_DWORD 0x2

This just tells me that the setting is per-volume. I'm not sure where
to look in the registry to find the settings for the individual
volumes.

There is information about this online, of course, e.g. see the
following, but I haven't found the answers I'm looking for yet​:

https://support.microsoft.com/en-gb/help/121007/how-to-disable-8-3-file-name-creation-on-ntfs-partitions
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/ff621566(v=ws.11)
https://guyrleech.wordpress.com/2014/04/11/ntfs-8-3-short-names-primer/
https://guyrleech.wordpress.com/2014/04/15/ntfs-8-3-short-names-solving-the-issues/

In the meantime perhaps it would be wise to at least add a note to
README.win32 about these possible test failures?

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.29.7:

Configured by shay at Mon Jan  7 13:24:20 2019.

Summary of my perl5 (revision 5 version 29 subversion 7) configuration:
  Commit id: 35ad0133df9b65a4e32f2f07a2a05b387bd79591
  Platform:
    osname=MSWin32
    osvers=10.0.17763.195
    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
    bincompat5005=undef
  Compiler:
    cc='cl'
    ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise
-DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-D_WINSOCK_DEPRECATED_NO_WARNINGS  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS'
    optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise'
    cppflags='-DWIN32'
    ccversion='19.16.27025.1'
    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:\perl\lib\CORE"  -machine:AMD64'
    libpth="C:\Program Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\VC\Tools\MSVC\14.16.27023\\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=perl529.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:\perl\lib\CORE"  -machine:AMD64'



@INC for perl 5.29.7:
    C:/perl/site/lib
    C:/perl/lib


Environment for perl 5.29.7:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64;C:\Program
Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\VC\VCPackages;C:\Program Files
(x86)\Microsoft SDKs\TypeScript\3.1;C:\Program Files (x86)\Microsoft
Visual Studio\2017
15.9\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program
Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\MSBuild\15.0\bin\Roslyn;C:\Program Files
(x86)\Microsoft Visual Studio\2017 15.9\Professional\Team
Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual
Studio\2017 15.9\Professional\Team Tools\Performance Tools;C:\Program
Files (x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\\x64;C:\Program Files
(x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files
(x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1
Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files
(x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\;C:\Program
Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Program Files
(x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual
Studio\2017 15.9\Professional\\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual
Studio\2017 15.9\Professional\Common7\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program
Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program
Files (x86)\Microsoft Visual Studio\2017
15.9\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2019

From rich@hyphen-dash-hyphen.info

On Mon, Jan 7, 2019 at 1​:37 PM Steve Hay (via RT)
<perlbug-followup@​perl.org> wrote​:

If I run the test suite on my C​: drive then all tests pass, but on my
D​: drive I get a bunch of failures​:

...
The difference seems to be that 8.3 filenames are disabled on my D​:
drive, as I can see using the fsutil.exe program​:
...
It is possible to query the registry, but if (as on my system) the
setting has been made per-volume rather than globally on or off then
I'm not sure exactly which settings need querying​:

Hi Steve,

The per-volume setting doesn't appear to be stored in the Registry
(based on use of Procmon on a test VM). Instead, it's stored in the
FILE_FS_PERSISTENT_VOLUME_INFORMATION structure [1], intended to be
queried with the NtFsControlFile function [2]

There are a few online discussions where people advise using
GetVolumeInformation (which underpins Win32​::FsType), but that advice
seems to be bogus. [3]

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/ns-ntifs-_file_fs_persistent_volume_information
[2] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/d4bc551b-7aaf-4b4f-ba0e-3a75e7c528f0
[3] https://stackoverflow.com/questions/18479322/how-to-check-programatically-that-8-3-short-path-name-is-enabled-on-system

HTH,
Rich

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2019

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2019

From rich@hyphen-dash-hyphen.info

On Thu, Apr 4, 2019 at 8​:54 PM Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

The per-volume setting doesn't appear to be stored in the Registry
(based on use of Procmon on a test VM). Instead, it's stored in the
FILE_FS_PERSISTENT_VOLUME_INFORMATION structure [1], intended to be
queried with the NtFsControlFile function [2]

Just noticed that this is also mentioned in a pending pull request​:
perl-libwin32/win32@7cf0da6

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2019

From @steve-m-hay

This may also be the cause of #121461.

@p5pRT
Copy link
Author

p5pRT commented Apr 24, 2019

From [Unknown Contact. See original ticket]

This may also be the cause of #121461.

@p5pRT
Copy link
Author

p5pRT commented May 25, 2019

From rich@hyphen-dash-hyphen.info

On Thu, Apr 4, 2019 at 9​:02 PM Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

Just noticed that this is also mentioned in a pending pull request​:
perl-libwin32/win32@7cf0da6

Coming back to this, is the ideal approach here (1) wchristian's patch
at the above link (2) some kind of SKIP tests if short paths aren't
present (3) add a probe for ntifs.h and add support for retrieving
FILE_FS_PERSISTENT_VOLUME_INFORMATION.

Asking 'cos if not (1), then I'm prepared to have a go at it.

Thanks,
Richard

@p5pRT
Copy link
Author

p5pRT commented May 31, 2019

From @steve-m-hay

On Sat, 25 May 2019 15​:35​:50 -0700, rich@​hyphen-dash-hyphen.info wrote​:

On Thu, Apr 4, 2019 at 9​:02 PM Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

Just noticed that this is also mentioned in a pending pull request​:
https://github.com/perl-
libwin32/win32/pull/12/commits/7cf0da647c973a64ccc120dd81749e7494930193

Coming back to this, is the ideal approach here (1) wchristian's patch
at the above link (2) some kind of SKIP tests if short paths aren't
present (3) add a probe for ntifs.h and add support for retrieving
FILE_FS_PERSISTENT_VOLUME_INFORMATION.

Asking 'cos if not (1), then I'm prepared to have a go at it.

All 3? ;-)

(3) would be useful to decide which test to perform in GetShortPathName.t (i.e. do the current test if 8.3 is supported, change to the simplified test in wchristian's patch if not).
(2) would be needed for the other failing tests if 8.3 is not supported (or perhaps conditionally change the test being done, like in (1), rather than skipping completely?).
(1) has a useful documentation update that ought to go in either way.

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2019

From rich@hyphen-dash-hyphen.info

On Fri, May 31, 2019 at 8​:48 PM Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

(3) would be useful to decide which test to perform in GetShortPathName.t (i.e. do the current test if 8.3 is supported, change to the simplified test in wchristian's patch if not).
(2) would be needed for the other failing tests if 8.3 is not supported (or perhaps conditionally change the test being done, like in (1), rather than skipping completely?).
(1) has a useful documentation update that ought to go in either way.

Unsatisfactory results here. I've got XS code that allows elevated
users to create a handle to (e.g.) \\.\c​: and pass that handle
DeviceIoControl() in order to retrieve
FILE_FS_PERSISTENT_VOLUME_INFORMATION.

Doesn't work for non-elevated users though. Via WinObj, EVERYONE has​:
* the QUERY STATE permissions on (e.g.) the C​: symbolic link.
* READ permissions on the \Device\HarddiskVolume{X} object

But although that seems like it should be sufficient, it isn't, and
normal users can't create the necessary handle. I'll play a little
more, but it's looking like this won't be a viable approach.


via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133754

@p5pRT
Copy link
Author

p5pRT commented Jun 14, 2019

From rich@hyphen-dash-hyphen.info

On Sun, Jun 9, 2019 at 11​:04 PM Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

(3) would be useful to decide which test to perform in GetShortPathName.t (i.e. do the current test if 8.3 is supported, change to the simplified test in wchristian's patch if not).

How about the attached simple approach? DWIMs in both 8dot3name
configurations locally.


via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133754

@p5pRT
Copy link
Author

p5pRT commented Jun 14, 2019

From rich@hyphen-dash-hyphen.info

use strict;
use Test;
use Win32;

my $path = "Long Path $$";
unlink($path);
END { unlink $path }

plan tests => 5;

Win32​::CreateFile($path);

my $short_disabled = 'Current volume does not support short path names';
if (-f $path && unlink 'LONGPA~1') {
  $short_disabled = undef;
  Win32​::CreateFile($path);
}

ok(-f $path);

my $short = Win32​::GetShortPathName($path);
skip($short_disabled, $short, qr/^\S{1,8}(\.\S{1,3})?$/);
skip($short_disabled, -f $short);

unlink($path);
ok(!-f $path);
ok(!defined Win32​::GetShortPathName($path));

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2019

From @steve-m-hay

On Fri, 14 Jun 2019 15​:20​:22 -0700, rich@​hyphen-dash-hyphen.info wrote​:

On Sun, Jun 9, 2019 at 11​:04 PM Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

(3) would be useful to decide which test to perform in
GetShortPathName.t (i.e. do the current test if 8.3 is supported,
change to the simplified test in wchristian's patch if not).

How about the attached simple approach? DWIMs in both 8dot3name
configurations locally.

Yes, that works for me.

@p5pRT
Copy link
Author

p5pRT commented Jun 19, 2019

From rich@hyphen-dash-hyphen.info

On Wed, Jun 19, 2019 at 1​:38 PM Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

On Fri, 14 Jun 2019 15​:20​:22 -0700, rich@​hyphen-dash-hyphen.info wrote​:

How about the attached simple approach? DWIMs in both 8dot3name
configurations locally.

Yes, that works for me.

Thanks. I'll look into whether the same sort of logic can be used to
keep the non-short path tests in unicode.t, or whether those are
effectively covered elsewhere and so just use the logic to skip the
lot if short paths aren't enabled. Then lob patches upstream.

Maybe EUMM too, if it rains at the weekend. ;-)


via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133754

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2019

From @steve-m-hay

On Wed, 19 Jun 2019 16​:12​:13 -0700, rich@​hyphen-dash-hyphen.info wrote​:

On Wed, Jun 19, 2019 at 1​:38 PM Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

On Fri, 14 Jun 2019 15​:20​:22 -0700, rich@​hyphen-dash-hyphen.info wrote​:

How about the attached simple approach? DWIMs in both 8dot3name
configurations locally.

Yes, that works for me.

Thanks. I'll look into whether the same sort of logic can be used to
keep the non-short path tests in unicode.t, or whether those are
effectively covered elsewhere and so just use the logic to skip the
lot if short paths aren't enabled. Then lob patches upstream.

Maybe EUMM too, if it rains at the weekend. ;-)

Thanks! Don't forget that changes to these CPAN module test scripts need to be sent upstream to their respective module maintainers. It would be great to get fixes checked in to new releases of those distros, and then we can pull them into blead.

@p5pRT
Copy link
Author

p5pRT commented Jun 23, 2019

From rich@hyphen-dash-hyphen.info

On Thu, Jun 20, 2019 at 8​:10 AM Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

Maybe EUMM too, if it rains at the weekend. ;-)

Steve,

Are those EUMM tests still failing for you with blead? They pass for
me on Win10, using Strawberry's tools, building in C​:\ with 8dot3names
disabled on that volume.

I've added a comment to wchristian's pull request on win32 for
GetShortPathName.t. (The explanatory text in that PR looks good, so
maybe easier to tweak the submitted test than submit a new PR on the
same topic).

Couldn't see an easy fix for Unicode.t, without really fixing Unicode
filesystem handling.

Cheers,
Richard


via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=133754

@p5pRT
Copy link
Author

p5pRT commented Jun 24, 2019

From @steve-m-hay

On Sun, 23 Jun 2019 at 23​:10, Richard Leach
<rich@​hyphen-dash-hyphen.info> wrote​:

On Thu, Jun 20, 2019 at 8​:10 AM Steve Hay via RT
<perlbug-followup@​perl.org> wrote​:

Maybe EUMM too, if it rains at the weekend. ;-)

Steve,

Are those EUMM tests still failing for you with blead? They pass for
me on Win10, using Strawberry's tools, building in C​:\ with 8dot3names
disabled on that volume.

Yes, they still fail for me (on Win10 D​:\ with 8.3 disabled, using
MSVC++). Verbose output is as follows​:

.\perl harness -v ../cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t
../cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t ..
compilet-Q3iDu.c
  Creating library compilet.lib and object compilet.exp
Generating code
Finished generating code
1..54
ok 1 - setup basic
ok 2 - chdir'd to XS-Testbasic
not ok 3 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'type map'
# Fallback to short pathname failed.
ok 4 # skip perl Makefile.PL failed
ok 5 # skip perl Makefile.PL failed
ok 6 - teardown XS-Testbasic
ok 7 - setup subdirs
ok 8 - chdir'd to XS-Testsubdirs
not ok 9 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'type map'
# Fallback to short pathname failed.
# Writing MYMETA.yml and MYMETA.json
ok 10 # skip perl Makefile.PL failed
ok 11 # skip perl Makefile.PL failed
ok 12 - teardown XS-Testsubdirs
ok 13 - setup subdirsstaticLINKTYPEdynamic
ok 14 - chdir'd to XS-TestsubdirsstaticLINKTYPEdynamic
not ok 15 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'type map'
# Fallback to short pathname failed.
# Writing MYMETA.yml and MYMETA.json
ok 16 # skip perl Makefile.PL failed
ok 17 # skip perl Makefile.PL failed
ok 18 - teardown XS-TestsubdirsstaticLINKTYPEdynamic
ok 19 - setup subdirsstaticdynamic
ok 20 - chdir'd to XS-Testsubdirsstaticdynamic
not ok 21 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'type map'
# Fallback to short pathname failed.
# Writing MYMETA.yml and MYMETA.json
ok 22 # skip perl Makefile.PL failed
ok 23 # skip perl Makefile.PL failed
ok 24 - teardown XS-Testsubdirsstaticdynamic
ok 25 - setup multi
ok 26 - chdir'd to XS-Testmulti

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
not ok 27 - Makefile.PL exited with zero
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'lib/XS/type map'
# Fallback to short pathname failed.
ok 28 # skip perl Makefile.PL failed
ok 29 # skip perl Makefile.PL failed
ok 30 - teardown XS-Testmulti
ok 31 - setup staticmultiLINKTYPEdynamic
ok 32 - chdir'd to XS-TeststaticmultiLINKTYPEdynamic
not ok 33 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'lib/XS/type map'
# Fallback to short pathname failed.
ok 34 # skip perl Makefile.PL failed
ok 35 # skip perl Makefile.PL failed
ok 36 - teardown XS-TeststaticmultiLINKTYPEdynamic
ok 37 - setup staticmultidynamic
ok 38 - chdir'd to XS-Teststaticmultidynamic
not ok 39 - Makefile.PL exited with zero

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'lib/XS/type map'
# Fallback to short pathname failed.
ok 40 # skip perl Makefile.PL failed
ok 41 # skip perl Makefile.PL failed
ok 42 - teardown XS-Teststaticmultidynamic
ok 43 - setup xsbuild
ok 44 - chdir'd to XS-Testxsbuild

# Failed test 'Makefile.PL exited with zero'
# at lib/MakeMaker/Test/Setup/XS.pm line 423.
not ok 45 - Makefile.PL exited with zero
# got​: 512
# expected​: 0
# Tried to use make dependency with space for non-GNU make​:
# 'lib/XS/type map'
# Fallback to short pathname failed.
ok 46 # skip perl Makefile.PL failed
ok 47 # skip perl Makefile.PL failed
ok 48 - teardown XS-Testxsbuild
ok 49 - setup subdirsskip
ok 50 - chdir'd to XS-Testsubdirsskip
ok 51 - Makefile.PL exited with zero
ok 52 - "nmake" exited normally
ok 53 - "nmake" test exited normally
ok 54 - teardown XS-Testsubdirsskip
# Looks like you failed 8 tests of 54.
Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/54 subtests
  (less 16 skipped subtests​: 30 okay)

Test Summary Report


../cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t (Wstat​: 2048 Tests​: 54 Failed​: 8)
  Failed tests​: 3, 9, 15, 21, 27, 33, 39, 45
  Non-zero exit status​: 8
Files=1, Tests=54, 110 wallclock secs ( 0.02 usr + 0.01 sys = 0.03 CPU)
Result​: FAIL

@p5pRT
Copy link
Author

p5pRT commented Jun 30, 2019

From rich@hyphen-dash-hyphen.info

On Mon, Jun 24, 2019 at 5​:38 PM Steve Hay <steve.m.hay@​googlemail.com> wrote​:

Are those EUMM tests still failing for you with blead? They pass for
me on Win10, using Strawberry's tools, building in C​:\ with 8dot3names
disabled on that volume.

Yes, they still fail for me (on Win10 D​:\ with 8.3 disabled, using
MSVC++). Verbose output is as follows​:

Ah, ok. I'm having trouble building with a freshly downloaded copy of
MSVC build tools, but will keep at it.

@richardleach
Copy link
Contributor

Updated some comments on Mithaldu's PR in perl-libwin32/win32#12 for skipping GetShortPathName.t and Unicode.t tests in the absence of short name support.

@richardleach
Copy link
Contributor

@steve-m-hay Just completed a fresh test run against blead and didn't get failures in /cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t with Mingw-64. Are you still seeing them with MSVC?

@richardleach
Copy link
Contributor

Oh, wait. Just remembered, may relate to quote_dep() in MM_Win32.pm, so I wouldn't see it with gmake anyway.

@steve-m-hay
Copy link
Contributor

steve-m-hay commented Feb 24, 2020 via email

@richardleach
Copy link
Contributor

Steve's above 02-xsdynamic.t errors come from MM_Win32.pm's quote_dep being unable to handle the "type map" argument in the absence of short path support.

"type map" comes from MakeMaker::Test::Setup::XS, which will actually remove the space if the make flavour cannot handle spaces (can_dep_space):

my $typemap = 'type map';
my $MM = MM->new({NAME=>'name', NORECURS=>1});
$typemap =~ s/ //g unless $MM->can_dep_space;

MM_Win32.pm always assumes that short path support will be present:

sub can_dep_space {
    my $self = shift;
    1; # with Win32::GetShortPathName
}

So resolving these test errors might be as straightforward of revising MM_Win32.pm's can_dep_space to check for short path support:

sub can_dep_space {
    # can_dep_space via GetShortPathName, if short paths are supported
    Win32::CreateFile("8dot3test_canary_can_dep_space $$");
    my $canary = Win32::GetShortPathName("8dot3test_canary_can_dep_space $$");
    unlink("8dot3test_canary_can_dep_space $$");
    return ( length $canary > 12 ) ? 0 : 1;
}

@steve-m-hay - do you have time to quickly test this idea? Otherwise, I'll try to get an nmake test environment built.

@richardleach
Copy link
Contributor

richardleach commented Mar 29, 2020

Good news: Got a MSVC build working.
Bad news: The above doesn't work (or doesn't work without something else being changed). Back to that MakeMaker::Test::Setup::XS snippet:

my $MM = MM->new({NAME=>'name', NORECURS=>1});
$typemap =~ s/ //g unless $MM->can_dep_space;

$MM is a PACK001 object and $MM->can_dep_space:

  1. returns 1
  2. Doesn't hit the can_dep_space subroutine in MM_Win32.pm on the way

I see from EUMM's MakeMaker object hierarchy (real) that here be dragons...

Edit: Probable PEBKAC, trying a fresh build.

@richardleach richardleach added the cpan-dual-life issues regarding dual-life cpan-first distributions label Mar 29, 2020
@richardleach
Copy link
Contributor

Confirmed that the suggested fix for 02-dynamic.t does work. Upstream PR at Perl-Toolchain-Gang/ExtUtils-MakeMaker#351

@richardleach
Copy link
Contributor

Currently known test failures due to 8dot3filename support being disabled should be fixed in the next stable perl release via:

  • 2b8fc25 for Win32's GetShortPathName.t and Unicode.t
  • When EUMM v7.49_04 (or a later build) is pulled in (assuming this happens prior to blead freeze) for EUMM's 02-dynamic.t.

@richardleach richardleach added the Closable? We might be able to close this ticket, but we need to check with the reporter label Oct 14, 2020
@tonycoz tonycoz closed this as completed Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closable? We might be able to close this ticket, but we need to check with the reporter cpan-dual-life issues regarding dual-life cpan-first distributions distro-mswin32 hasPatch type-core
Projects
None yet
Development

No branches or pull requests

5 participants