develooper Front page | perl.perl5.porters | Postings from January 2019

[perl #133754] Test failures on Windows with 8.3 filenames disabled

From:
Steve Hay
Date:
January 7, 2019 13:36
Subject:
[perl #133754] Test failures on Windows with 8.3 filenames disabled
Message ID:
rt-4.0.24-16313-1546868195-523.133754-75-0@perl.org
# New Ticket Created by  Steve Hay 
# Please include the string:  [perl #133754]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133754 >


This is a bug report for perl from steve.m.hay@googlemail.com,
generated with the help of perlbug 1.41 running under perl 5.29.7.


-----------------------------------------------------------------
[Please describe your issue here]

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?

[Please do not change anything below this line]
-----------------------------------------------------------------
---
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)




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About