Skip to content

Commit 400a537

Browse files
committed
Several other tests that are affected by the Cygwin SO_PEERCRED bug.
Unfortunately it's harder to work around in these tests since socket creation is significantly more buried in the code being tested. Better to just skip them.
1 parent 3d1c0bf commit 400a537

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎Lib/test/test_asyncio/test_events.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ def test_sock_client_ops(self):
471471
self._basetest_sock_recv_into(httpd, sock)
472472

473473
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
474+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
474475
def test_unix_sock_client_ops(self):
475476
with test_utils.run_test_unix_server() as httpd:
476477
sock = socket.socket(socket.AF_UNIX)
@@ -970,6 +971,7 @@ def _make_unix_server(self, factory, **kwargs):
970971
return server, path
971972

972973
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
974+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
973975
def test_create_unix_server(self):
974976
proto = MyProto(loop=self.loop)
975977
server, path = self._make_unix_server(lambda: proto)
@@ -1067,6 +1069,7 @@ def test_legacy_create_server_ssl(self):
10671069

10681070
@unittest.skipIf(ssl is None, 'No ssl module')
10691071
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
1072+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
10701073
def test_create_unix_server_ssl(self):
10711074
proto = MyProto(loop=self.loop)
10721075
server, path = self._make_ssl_unix_server(
@@ -1135,6 +1138,7 @@ def test_legacy_create_server_ssl_verify_failed(self):
11351138

11361139
@unittest.skipIf(ssl is None, 'No ssl module')
11371140
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
1141+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
11381142
def test_create_unix_server_ssl_verify_failed(self):
11391143
proto = MyProto(loop=self.loop)
11401144
server, path = self._make_ssl_unix_server(
@@ -1202,6 +1206,7 @@ def test_legacy_create_server_ssl_match_failed(self):
12021206

12031207
@unittest.skipIf(ssl is None, 'No ssl module')
12041208
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
1209+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
12051210
def test_create_unix_server_ssl_verified(self):
12061211
proto = MyProto(loop=self.loop)
12071212
server, path = self._make_ssl_unix_server(

‎Lib/test/test_asyncio/test_streams.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ def client(addr):
634634
self.assertEqual(msg, b"hello world!\n")
635635

636636
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
637+
@unittest.skipIf(sys.platform == 'cygwin', 'cygwin has known bug')
637638
def test_start_unix_server(self):
638639

639640
class MyServer:

0 commit comments

Comments
 (0)