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

15 failing tests fail when running make test on a Mac #73

Open
rtindru opened this issue May 2, 2022 · 1 comment
Open

15 failing tests fail when running make test on a Mac #73

rtindru opened this issue May 2, 2022 · 1 comment

Comments

@rtindru
Copy link

rtindru commented May 2, 2022

Issue

A total of 15 tests fail when I run make test on the docker container running on a Mac

Hypothesis

Some of these tests seem to be failing due to encoding issues.
My guess is that the mismatch in the underlying filesystem (docker says linux, but I run Mac) could be the root cause.
I noticed that underlying the code for these tests does check for the system architecture, but I am out of my depth here to be 100% sure.
Ex: test_non_ascii ->

def test_non_ascii(self):
# Mac OS X denies the creation of a file with an invalid UTF-8 name.
# Windows allows creating a name with an arbitrary bytes name, but
# Python cannot a undecodable bytes argument to a subprocess.
if (support.TESTFN_UNDECODABLE
and sys.platform not in ('win32', 'darwin')):
name = os.fsdecode(support.TESTFN_UNDECODABLE)
elif support.TESTFN_NONASCII:
name = support.TESTFN_NONASCII
else:
self.skipTest("need support.TESTFN_NONASCII")

Steps to reproduce

  • Get a Mac 💻
  • Checkout code and build using the instructions in the ReadME
  • Run make test

System information

  • MacBook Pro (16-inch, 2019)
  • OS version: 11.2.3
  • Darwin Kernel Version 20.3.0
  • xnu-7195.81.3~1/RELEASE_X86_64 x86_64

List of all failing tests

======================================================================
ERROR: test_nonascii_abspath (test.test_posixpath.PosixCommonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_genericpath.py", line 491, in test_nonascii_abspath
    with support.temp_cwd(name):
  File "/vol/Lib/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/vol/Lib/test/support/__init__.py", line 1098, in temp_cwd
    with temp_dir(path=name, quiet=quiet) as temp_path:
  File "/vol/Lib/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/vol/Lib/test/support/__init__.py", line 1037, in temp_dir
    os.mkdir(path)
OSError: [Errno 92] Protocol not available: b'@test_10166_tmp\xe7w\xf0'

----------------------------------------------------------------------

Ran 74 tests in 0.963s

FAILED (errors=1)
test test_posixpath failed

======================================================================
ERROR: test_nonascii_abspath (test.test_ntpath.NtCommonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_genericpath.py", line 491, in test_nonascii_abspath
    with support.temp_cwd(name):
  File "/vol/Lib/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/vol/Lib/test/support/__init__.py", line 1098, in temp_cwd
    with temp_dir(path=name, quiet=quiet) as temp_path:
  File "/vol/Lib/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/vol/Lib/test/support/__init__.py", line 1037, in temp_dir
    os.mkdir(path)
OSError: [Errno 92] Protocol not available: b'@test_10166_tmp\xe7w\xf0'

----------------------------------------------------------------------

Ran 71 tests in 0.432s

FAILED (errors=1, skipped=9)
test test_ntpath failed

======================================================================
ERROR: test_directories (test.test_unicode_file.TestUnicodeFiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_unicode_file.py", line 133, in test_directories
    self._do_directory(TESTFN_UNENCODABLE+ext,
  File "/vol/Lib/test/test_unicode_file.py", line 87, in _do_directory
    os.mkdir(make_name)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff.dir'

======================================================================
ERROR: test_single_files (test.test_unicode_file.TestUnicodeFiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_unicode_file.py", line 123, in test_single_files
    self._test_single(TESTFN_UNENCODABLE)
  File "/vol/Lib/test/test_unicode_file.py", line 104, in _test_single
    create_empty_file(filename)
  File "/vol/Lib/test/support/__init__.py", line 1140, in create_empty_file
    fd = os.open(filename, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: '@test_10166_tmp-\udcff'

----------------------------------------------------------------------

Ran 2 tests in 0.091s

FAILED (errors=2)
test test_unicode_file failed

======================================================================
ERROR: test_listdir (test.test_os.Pep383Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_os.py", line 2074, in setUp
    os.mkdir(self.dir)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff'

======================================================================
ERROR: test_open (test.test_os.Pep383Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_os.py", line 2074, in setUp
    os.mkdir(self.dir)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff'

======================================================================
ERROR: test_stat (test.test_os.Pep383Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_os.py", line 2074, in setUp
    os.mkdir(self.dir)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff'

======================================================================
ERROR: test_statvfs (test.test_os.Pep383Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_os.py", line 2074, in setUp
    os.mkdir(self.dir)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff'

----------------------------------------------------------------------

Ran 291 tests in 74.965s

FAILED (errors=4, skipped=49)

======================================================================
ERROR: test_unencodeable (test.test_imp.NullImporterTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_imp.py", line 450, in test_unencodeable
    os.mkdir(name)
OSError: [Errno 92] Protocol not available: '@test_10166_tmp-\udcff'

----------------------------------------------------------------------

Ran 28 tests in 0.812s

FAILED (errors=1)
test test_imp failed


======================================================================
ERROR: test_lchown (test.test_posix.PosixTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_posix.py", line 794, in test_lchown
    self._test_all_chown_common(posix.lchown, support.TESTFN,
  File "/vol/Lib/test/test_posix.py", line 710, in _test_all_chown_common
    chown_func(first_param, -1, gid)
FileNotFoundError: [Errno 2] No such file or directory: '@test_10166_tmp'

----------------------------------------------------------------------

Ran 141 tests in 6.260s

FAILED (errors=1, skipped=10)
test test_posix failed

======================================================================
ERROR: testUnencodable (test.test_zipimport.UncompressedZipImportTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_zipimport.py", line 652, in testUnencodable
    with ZipFile(filename, "w") as z:
  File "/vol/Lib/zipfile.py", line 1251, in __init__
    self.fp = io.open(file, filemode)
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: '@test_10166_tmp-\udcff.zip'

======================================================================
ERROR: testUnencodable (test.test_zipimport.CompressedZipImportTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_zipimport.py", line 652, in testUnencodable
    with ZipFile(filename, "w") as z:
  File "/vol/Lib/zipfile.py", line 1251, in __init__
    self.fp = io.open(file, filemode)
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: '@test_10166_tmp-\udcff.zip'

----------------------------------------------------------------------

Ran 69 tests in 1.555s

FAILED (errors=2)
test test_zipimport failed

======================================================================
ERROR: testUnencodableAddr (test.test_socket.TestUnixDomain)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_socket.py", line 5153, in testUnencodableAddr
    self.bind(self.sock, path)
  File "/vol/Lib/test/test_socket.py", line 5111, in bind
    support.bind_unix_socket(sock, path)
  File "/vol/Lib/test/support/__init__.py", line 793, in bind_unix_socket
    sock.bind(addr)
OSError: [Errno 92] Protocol not available

----------------------------------------------------------------------

Ran 579 tests in 25.838s

FAILED (errors=1, skipped=127)
test test_socket failed

======================================================================
ERROR: test_unencodable_filename (test.test_import.ImportTracebackTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_import/__init__.py", line 1270, in test_unencodable_filename
    pyname = script_helper.make_script('', TESTFN_UNENCODABLE, 'pass')
  File "/vol/Lib/test/support/script_helper.py", line 208, in make_script
    with open(script_name, 'w', encoding='utf-8') as script_file:
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: '@test_10166_tmp-\udcff.py'

----------------------------------------------------------------------

Ran 82 tests in 1.985s

FAILED (errors=1, skipped=3)
test test_import failed

======================================================================
ERROR: test_non_ascii (test.test_cmd_line_script.CmdLineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vol/Lib/test/test_cmd_line_script.py", line 545, in test_non_ascii
    script_name = _make_test_script(os.curdir, name, source)
  File "/vol/Lib/test/test_cmd_line_script.py", line 79, in _make_test_script
    to_return = make_script(script_dir, script_basename, source)
  File "/vol/Lib/test/support/script_helper.py", line 208, in make_script
    with open(script_name, 'w', encoding='utf-8') as script_file:
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: './@test_10166_tmp\udce7w\udcf0.py'

----------------------------------------------------------------------

Ran 42 tests in 21.665s

FAILED (errors=1)
test test_cmd_line_script failed
@rtindru rtindru changed the title Encoding tests fail when running make test on a Mac 15 failing tests fail when running make test on a Mac May 2, 2022
@itamaro
Copy link
Contributor

itamaro commented May 2, 2022

thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants