From: Adam B. <re...@bu...> - 2018-10-18 03:32:26
|
New submission from Adam Burke <ada...@gm...>: 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. ---------- components: Library messages: 12140 nosy: adamburke, jamesmudd, jeff.allen severity: normal status: open title: test_chdir shortname failures on some later Windows filesystems type: behaviour versions: Jython 2.7 _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue2709> _______________________________________ |