From b75fc0ad5b776754fb69adbd2244633dcc23a783 Mon Sep 17 00:00:00 2001 From: salsal97 Date: Mon, 31 Jul 2023 20:21:16 +0000 Subject: [PATCH] disable cpython test_poll2, test_pidfd_open, test_select and test_ssl --- .../cpython-tests/{readme.md => README.md} | 6 ++++ .../cpython-tests/test_config_v3.8.11/patch | 36 +++++++++++++++++-- .../cpython-tests/test_config_v3.9.7/patch | 22 +++++++++++- 3 files changed, 61 insertions(+), 3 deletions(-) rename solutions/cpython-tests/{readme.md => README.md} (97%) diff --git a/solutions/cpython-tests/readme.md b/solutions/cpython-tests/README.md similarity index 97% rename from solutions/cpython-tests/readme.md rename to solutions/cpython-tests/README.md index d76d2776a..02766e107 100644 --- a/solutions/cpython-tests/readme.md +++ b/solutions/cpython-tests/README.md @@ -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 @@ -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 @@ -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 diff --git a/solutions/cpython-tests/test_config_v3.8.11/patch b/solutions/cpython-tests/test_config_v3.8.11/patch index f2912d224..cc80ec271 100644 --- a/solutions/cpython-tests/test_config_v3.8.11/patch +++ b/solutions/cpython-tests/test_config_v3.8.11/patch @@ -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 @@ -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): @@ -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 diff --git a/solutions/cpython-tests/test_config_v3.9.7/patch b/solutions/cpython-tests/test_config_v3.9.7/patch index 8393d717d..31bb1b362 100644 --- a/solutions/cpython-tests/test_config_v3.9.7/patch +++ b/solutions/cpython-tests/test_config_v3.9.7/patch @@ -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): @@ -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 @@ -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