15 failing tests fail when running `make test` on a Mac
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, python
- Domain
- operating-systems, testing
Research direction
Start by running make test in the Docker-on-Mac setup and compare the listed failures. Read the referenced tests in Lib/test/test_cmd_line_script.py, test_genericpath.py, test_unicode_file.py, test_os.py, test_posix.py, test_zipimport.py, test_socket.py, and test_import. Done means identifying the shared cause and resolving or appropriately handling the 15 Mac failures.
Written by the indexing model from the issue text.
Description
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 -> https://github.com/facebookincubator/cinder/blob/7ccf3d80e70dd1284868b4ce255a2527e22b84a9/Lib/test/test_cmd_line_script.py#L531-L542
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
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebookincubator/MetaPython
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
facebookincubator/MetaPython#147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
facebookincubator/MetaPython#146 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
facebookincubator/MetaPython#145 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
facebookincubator/MetaPython#144 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
facebookincubator/MetaPython#129 · 2 comments ·
All issues in facebookincubator/MetaPython
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·