gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)

This commit is contained in:
Christian Heimes 2022-05-19 12:43:16 +02:00 committed by GitHub
parent e48ac9c100
commit 137fd3d88a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 109 additions and 14 deletions

View file

@ -11,7 +11,6 @@ import fnmatch
import fractions
import itertools
import locale
import mmap
import os
import pickle
import select
@ -59,6 +58,10 @@ try:
except ImportError:
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
try:
import mmap
except ImportError:
mmap = None
from test.support.script_helper import assert_python_ok
from test.support import unix_shell
@ -2167,7 +2170,8 @@ class TestInvalidFD(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
@unittest.skipIf(
support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
support.is_emscripten or support.is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
)
def test_fpathconf(self):
self.check(os.pathconf, "PC_NAME_MAX")
@ -2460,6 +2464,7 @@ class Win32KillTests(unittest.TestCase):
# os.kill on Windows can take an int which gets set as the exit code
self._kill(100)
@unittest.skipIf(mmap is None, "requires mmap")
def _kill_with_event(self, event, name):
tagname = "test_os_%s" % uuid.uuid1()
m = mmap.mmap(-1, 1, tagname)