From e6c5760a3d08a8a297ac5e76c97e9db6181fd15d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 11 Jan 2022 17:19:12 +0100 Subject: [PATCH] bpo-40280: Skip IPPROTO_SCTP tests on Emscripten Creation of IPPROTO_SCTP sockets cause the Emscripten runtime to crash. Signed-off-by: Christian Heimes --- Lib/test/test_socket.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 394d2942483fb2..1ff2447e62ef5b 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -43,6 +43,7 @@ VSOCKPORT = 1234 AIX = platform.system() == "AIX" +EMSCRIPTEN = sys.platform == "Emscripten" try: import _socket @@ -4378,14 +4379,16 @@ class SendrecvmsgSCTPStreamTestBase(SendrecvmsgSCTPFlagsBase, pass @requireAttrs(socket.socket, "sendmsg") -@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") @requireSocket("AF_INET", "SOCK_STREAM", "IPPROTO_SCTP") +@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") +@unittest.skipIf(EMSCRIPTEN, "IPPROTO_SCTP: aborts on Emscripten") class SendmsgSCTPStreamTest(SendmsgStreamTests, SendrecvmsgSCTPStreamTestBase): pass @requireAttrs(socket.socket, "recvmsg") -@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") @requireSocket("AF_INET", "SOCK_STREAM", "IPPROTO_SCTP") +@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") +@unittest.skipIf(EMSCRIPTEN, "IPPROTO_SCTP: aborts on Emscripten") class RecvmsgSCTPStreamTest(RecvmsgTests, RecvmsgGenericStreamTests, SendrecvmsgSCTPStreamTestBase): @@ -4398,8 +4401,9 @@ def testRecvmsgEOF(self): self.skipTest("sporadic ENOTCONN (kernel issue?) - see issue #13876") @requireAttrs(socket.socket, "recvmsg_into") -@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") @requireSocket("AF_INET", "SOCK_STREAM", "IPPROTO_SCTP") +@unittest.skipIf(AIX, "IPPROTO_SCTP: [Errno 62] Protocol not supported on AIX") +@unittest.skipIf(EMSCRIPTEN, "IPPROTO_SCTP: aborts on Emscripten") class RecvmsgIntoSCTPStreamTest(RecvmsgIntoTests, RecvmsgGenericStreamTests, SendrecvmsgSCTPStreamTestBase):