[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

Erlend E. Aasland report at bugs.python.org
Thu Jun 24 05:39:40 EDT 2021


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Using this patch, I'm (so far) no longer able to reproduce these test failures:

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index cee97a8302..c9c1546467 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2443,9 +2443,13 @@ def wrap_conn(self):
                 self.server.conn_errors.append(str(e))
                 if self.server.chatty:
                     handle_error("\n server:  bad connection attempt from " + repr(self.addr) + ":\n")
-                self.running = False
-                self.server.stop()
-                self.close()
+
+                # bpo-44229, bpo-43855, bpo-44237, and bpo-33450:
+                # Ignore spurious EPROTOTYPE returned by write() on macOS.
+                if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
+                    self.running = False
+                    self.server.stop()
+                    self.close()
                 return False
             else:
                 self.server.shared_ciphers.append(self.sslconn.shared_ciphers())



Running for 40 minutes now, right now passing 6k iterations for test_get_server_certificate, test_msg_callback_deadlock_bpo43577, and test_get_server_certificate_sni.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44229>
_______________________________________


More information about the Python-bugs-list mailing list