https://github.com/python/cpython/commit/71fa9b4183f22bff7f64d9f1c4442200f7ba89d7
commit: 71fa9b4183f22bff7f64d9f1c4442200f7ba89d7
branch: 3.14
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-22T11:53:08Z
summary:

[3.14] gh-154272: Skip forkserver tests when the start method is unavailable 
(GH-154274) (GH-154471)

(cherry picked from commit 13e3f8aa839d71285f3408241b0518da499eac39)

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

files:
M Lib/test/test_concurrent_futures/util.py
M Lib/test/test_multiprocessing_forkserver/__init__.py

diff --git a/Lib/test/test_concurrent_futures/util.py 
b/Lib/test/test_concurrent_futures/util.py
index b12940414d9142d..842fdb0431ed18a 100644
--- a/Lib/test/test_concurrent_futures/util.py
+++ b/Lib/test/test_concurrent_futures/util.py
@@ -138,6 +138,8 @@ def get_context(self):
             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):
diff --git a/Lib/test/test_multiprocessing_forkserver/__init__.py 
b/Lib/test/test_multiprocessing_forkserver/__init__.py
index d91715a344dfa7f..6bac9b7f9a97134 100644
--- a/Lib/test/test_multiprocessing_forkserver/__init__.py
+++ b/Lib/test/test_multiprocessing_forkserver/__init__.py
@@ -1,3 +1,4 @@
+import multiprocessing
 import os.path
 import sys
 import unittest
@@ -9,5 +10,10 @@
 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)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to