From 01dfc6d2a5829e8ab25ae5398c96af57cf343341 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 4 Mar 2017 05:43:11 -0500 Subject: [PATCH 1/2] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS Skip some tests of select.poll when running on macOS due to unresolved issues with the underlying system poll function on some macOS versions. --- Lib/test/eintrdata/eintr_tester.py | 2 ++ Lib/test/test_asyncore.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py index d194e775eaeb8f..c619b3d6c38a59 100644 --- a/Lib/test/eintrdata/eintr_tester.py +++ b/Lib/test/eintrdata/eintr_tester.py @@ -437,6 +437,8 @@ def test_select(self): self.stop_alarm() self.assertGreaterEqual(dt, self.sleep_time) + @unittest.skipIf(sys.platform == "darwin", + "poll may fail on macOS; see issue #28087") @unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll') def test_poll(self): poller = select.poll() diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 51c65737a441de..d05462b7efce35 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -661,6 +661,9 @@ def test_handle_expt(self): if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX: self.skipTest("Not applicable to AF_UNIX sockets.") + if sys.platform == "darwin" and self.use_poll: + self.skipTest("poll may fail on macOS; see issue #28087") + class TestClient(BaseClient): def handle_expt(self): self.socket.recv(1024, socket.MSG_OOB) From d0c39aad005bc70fa0d8b38e19e814a5db7d1dbc Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 4 Mar 2017 05:55:48 -0500 Subject: [PATCH 2/2] Update Misc/NEWS --- Misc/NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 899723937c84a1..3ff3cb5b8b65e6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -895,6 +895,10 @@ Tools/Demos Tests ----- +- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. + Skip some tests of select.poll when running on macOS due to unresolved + issues with the underlying system poll function on some macOS versions. + - Issue #29571: to match the behaviour of the ``re.LOCALE`` flag, test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to determine the candidate encoding for the test regex (allowing it to correctly