Message12140

Author adamburke
Recipients adamburke, jamesmudd, jeff.allen
Date 2018-10-18.03:32:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539833538.32.0.788709270274.issue2709@psf.upfronthosting.co.za>
In-reply-to
Content
Am seeing failures of test_chdir.test_windows_chdir_dos_path on my Windows machine. Reproducible from Windows 10, using windows cmd and cygwin command lines on JDK 8 and 10. 

JDK 8 example:

c:\working\working>%JY%\dist\bin\jython.exe -m test.regrtest -v test_chdir
== 2.7.2a1+ (, Oct 16 2018, 11:40:48)
== [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
== platform: java1.8.0_111
== encodings: stdin=cp850, stdout=cp850, FS=utf-8
== locale: default=('en_AU', 'windows-1252'), actual=(None, None)
test_chdir
test_chdir (test.test_chdir.ChdirTestCase) ... ok
...
======================================================================
ERROR: test_windows_chdir_dos_path (test.test_chdir.WindowsChdirTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Adam\jython\jython\dist\Lib\test\test_chdir.py", line 193, in test_windows_chdir_dos_path
    os.chdir(dos_name)
OSError: [Errno 2] No such file or directory: 'C:\\Users\\Adam\\AppData\\Local\\Temp\\tmpbd0rjl\\progra~1'

----------------------------------------------------------------------
Ran 42 tests in 0.778s

FAILED (errors=1)
test test_chdir failed -- Traceback (most recent call last):
  File "C:\Users\Adam\jython\jython\dist\Lib\test\test_chdir.py", line 193, in test_windows_chdir_dos_path
    os.chdir(dos_name)
OSError: [Errno 2] No such file or directory: 'C:\\Users\\Adam\\AppData\\Local\\Temp\\tmpbd0rjl\\progra~1'

1 test failed:
    test_chdir
1 fail unexpected:
    test_chdir
 
The immediate cause seems to be the otherwise reasonable re-inclusion of this test for windows in the fix for http://bugs.jython.org/issue2646

That seems to be failing because, as I have learned, it is no longer universal for all windows files and directories to have equivalent short DOS ("8dot3") names.

https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name

The setting lives at a filesystem level, and can be read from the command line with the fsutil command

C:\Users\Adam\jython\jython>fsutil 8dot3name query
The registry state is: 1 (Disable 8dot3 name creation on all volumes).

I have a potential fix which basically involves some checks for validity in the unit test itself. I will raise a github PR.
History
Date User Action Args
2018-10-18 03:32:18adamburkesetrecipients: + adamburke, jeff.allen, jamesmudd
2018-10-18 03:32:18adamburkesetmessageid: <1539833538.32.0.788709270274.issue2709@psf.upfronthosting.co.za>
2018-10-18 03:32:18adamburkelinkissue2709 messages
2018-10-18 03:32:16adamburkecreate