https://github.com/python/cpython/commit/ec9587270e04bed5756d1e2a3c7afb43c41df5e6 commit: ec9587270e04bed5756d1e2a3c7afb43c41df5e6 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-07-21T16:31:13Z summary:
[3.14] gh-154379: Fix test_epoll on Solaris (GH-154380) (GH-154383) A non-blocking connect() can be completed immediately, and unregistering a closed file descriptor succeeds on Solaris. (cherry picked from commit b6abee522f1dbbba36cc306aa99ac22d1df5c454) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> files: M Lib/test/test_epoll.py diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py index c94946a6ae6b7c..8195f437843e51 100644 --- a/Lib/test/test_epoll.py +++ b/Lib/test/test_epoll.py @@ -25,6 +25,7 @@ import os import select import socket +import sys import time import unittest from test import support @@ -52,12 +53,11 @@ def tearDown(self): def _connected_pair(self): client = socket.socket() client.setblocking(False) + # The connection is either established immediately or in progress. try: client.connect(('127.0.0.1', self.serverSocket.getsockname()[1])) except OSError as e: self.assertEqual(e.args[0], errno.EINPROGRESS) - else: - raise AssertionError("Connect should have raised EINPROGRESS") server, addr = self.serverSocket.accept() self.connections.extend((client, server)) @@ -218,6 +218,9 @@ def test_errors(self): self.assertRaises(ValueError, select.epoll().register, -1, select.EPOLLIN) + @unittest.skipIf(sys.platform.startswith('sunos'), + 'unregistering a closed file descriptor succeeds ' + 'on Solaris') def test_unregister_closed(self): server, client = self._connected_pair() fd = server.fileno() _______________________________________________ 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]
