]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-154272: Skip forkserver tests when the start method is unavailable (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 22 Jul 2026 11:53:08 +0000 (14:53 +0300)
committerGitHub <noreply@github.com>
Wed, 22 Jul 2026 11:53:08 +0000 (11:53 +0000)
(cherry picked from commit 13e3f8aa839d71285f3408241b0518da499eac39)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/test/test_concurrent_futures/util.py
Lib/test/test_multiprocessing_forkserver/__init__.py

index b12940414d9142d26622c1b00e2b551fbd5a43ca..842fdb0431ed18ac9261da5e0ca7632dd09eeb7e 100644 (file)
@@ -138,6 +138,8 @@ class ProcessPoolForkserverMixin(ExecutorMixin):
             self.skipTest("require unix system")
         if support.check_sanitizer(thread=True):
             self.skipTest("TSAN doesn't support threads after fork")
+        if "forkserver" not in multiprocessing.get_all_start_methods():
+            self.skipTest("forkserver start method is not available")
         return super().get_context()
 
     def create_event(self):
index d91715a344dfa7f7a6253966f48ac2b60c0ab7ec..6bac9b7f9a97134266320c5e7d33a0513713c167 100644 (file)
@@ -1,3 +1,4 @@
+import multiprocessing
 import os.path
 import sys
 import unittest
@@ -9,5 +10,10 @@ if support.PGO:
 if sys.platform == "win32":
     raise unittest.SkipTest("forkserver is not available on Windows")
 
+# The forkserver start method requires passing file descriptors over a Unix
+# socket, which is not available on every platform (e.g. Solaris/illumos).
+if "forkserver" not in multiprocessing.get_all_start_methods():
+    raise unittest.SkipTest("forkserver start method is not available")
+
 def load_tests(*args):
     return support.load_package_tests(os.path.dirname(__file__), *args)