From 23e8fc277593df872498b6e06bda476f824f3d01 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:39:26 +0100 Subject: [PATCH] [3.12] gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (#128124) gh-128116: Skip test_socket VSOCK testStream() on PermissionError (GH-128120) (cherry picked from commit cbfe3023e46b544b80ea1a38a8c900c6fb881554) Co-authored-by: Victor Stinner --- Lib/test/test_socket.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index b40ad28f7a7d..8fda0d7f8bac 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -513,7 +513,10 @@ class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest): self.cli.connect((cid, VSOCKPORT)) def testStream(self): - msg = self.conn.recv(1024) + try: + msg = self.conn.recv(1024) + except PermissionError as exc: + self.skipTest(repr(exc)) self.assertEqual(msg, MSG) def _testStream(self): -- 2.47.3