Skip to content

Commit

Permalink
disable cpython test_poll2, test_pidfd_open, test_select and test_ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
salsal97 committed Aug 1, 2023
1 parent 412e2ff commit b75fc0a
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Here is a list of all the skipped individual unit tests
* test_ssl
* test_random_fork
* test_keylog_defaults
* test_load_default_certs_env
* test_support
* test_temp_dir__forked_child
* test_reap_children
Expand All @@ -56,6 +57,9 @@ Here is a list of all the skipped individual unit tests
* test_mkfifo_dir_fd
* test_sched_rr_get_interval
* test_sched_priority
* test_poll
* test_poll2
* test_select

### v3.9

Expand Down Expand Up @@ -96,6 +100,8 @@ Here is a list of all the skipped individual unit tests
* test_mkfifo_dir_fd
* test_sched_rr_get_interval
* test_sched_priority
* test_pidfd_open
* test_select


### v3.10
Expand Down
36 changes: 34 additions & 2 deletions solutions/cpython-tests/test_config_v3.8.11/patch
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ index effac97..7d8cb89 100644
def test_lock_conflict(self):
# Fork off a child process that will lock the mailbox temporarily,
# unlock it and exit.
diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py
index ef966bf..34a227b 100644
--- a/Lib/test/test_poll.py
+++ b/Lib/test/test_poll.py
@@ -117,6 +117,7 @@ class PollTests(unittest.TestCase):
# Another test case for poll(). This is copied from the test case for
# select(), modified to use poll() instead.

+ @unittest.skip("Temporarily disabled in Mystikos") # unsupported mmap from child before execve
def test_poll2(self):
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 9bdd284..87c8a65 100644
--- a/Lib/test/test_posix.py
Expand Down Expand Up @@ -222,8 +234,20 @@ index 899ca10..b9b0225 100644
def test_after_fork(self):
# Test the global Random instance gets reseeded in child
r, w = os.pipe()
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index 458998a..b7e6498 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -44,6 +44,7 @@ class SelectTestCase(unittest.TestCase):
self.assertIsNot(r, x)
self.assertIsNot(w, x)

+ @unittest.skip("Temporarily disabled in Mystikos") # unsupported mmap from child before execve
def test_select(self):
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
with os.popen(cmd) as p:
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 32bb2aa..0c9c6bd 100644
index 32bb2aa..1259d86 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -417,7 +417,8 @@ class BasicSocketTests(unittest.TestCase):
Expand All @@ -236,7 +260,15 @@ index 32bb2aa..0c9c6bd 100644
def test_random_fork(self):
status = ssl.RAND_status()
if not status:
@@ -4662,6 +4663,7 @@ class TestSSLDebug(unittest.TestCase):
@@ -1619,6 +1620,7 @@ class ContextTests(unittest.TestCase):

@unittest.skipIf(sys.platform == "win32", "not-Windows specific")
@unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars")
+ @unittest.skip("Temporarily disabled in Mystikos")
def test_load_default_certs_env(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
with support.EnvironmentVarGuard() as env:
@@ -4662,6 +4664,7 @@ class TestSSLDebug(unittest.TestCase):
return len(list(f))

@requires_keylog
Expand Down
22 changes: 21 additions & 1 deletion solutions/cpython-tests/test_config_v3.9.7/patch
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ index 6f891d4..3ab6374 100644
# Fork off a child process that will lock the mailbox temporarily,
# unlock it and exit.
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index f4edb8b..924582c 100644
index f4edb8b..f05108e 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -88,6 +88,7 @@ class PosixTester(unittest.TestCase):
Expand Down Expand Up @@ -166,6 +166,14 @@ index f4edb8b..924582c 100644
def test_sched_rr_get_interval(self):
try:
interval = posix.sched_rr_get_interval(0)
@@ -1469,6 +1480,7 @@ class PosixTester(unittest.TestCase):
open(fn, 'wb').close()
self.assertRaises(ValueError, os.stat, fn_with_NUL)

+ @unittest.skip("Temporarily disabled in Mystikos") # SYS_pidfd_open not supported in Mystikos.
@unittest.skipUnless(hasattr(os, "pidfd_open"), "pidfd_open unavailable")
def test_pidfd_open(self):
with self.assertRaises(OSError) as cm:
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index 9c32467..9156d89 100644
--- a/Lib/test/test_pty.py
Expand All @@ -192,6 +200,18 @@ index 0fa3a09..d7a1941 100644
def test_after_fork(self):
# Test the global Random instance gets reseeded in child
r, w = os.pipe()
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index 458998a..b7e6498 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -44,6 +44,7 @@ class SelectTestCase(unittest.TestCase):
self.assertIsNot(r, x)
self.assertIsNot(w, x)

+ @unittest.skip("Temporarily disabled in Mystikos") # unsupported mmap from child before execve
def test_select(self):
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
with os.popen(cmd) as p:
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 60a7741..c2ec44f 100644
--- a/Lib/test/test_support.py
Expand Down

0 comments on commit b75fc0a

Please sign in to comment.