Skip to content

Commit 58ff9b3

Browse files
committed
pythongh-123695: fix race:sock_recv_impl suppressions for free-thread building
Signed-off-by: Manjusaka <[email protected]>
1 parent d2eafe2 commit 58ff9b3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Lib/test/test_socket.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4806,15 +4806,16 @@ def testInterruptedSendmsgTimeout(self):
48064806

48074807

48084808
class TCPCloserTest(ThreadedTCPSocketTest):
4809+
def __init__(self, methodName='runTest'):
4810+
super().__init__(methodName)
48094811

48104812
def testClose(self):
48114813
conn, addr = self.serv.accept()
4812-
conn.close()
48134814

48144815
sd = self.cli
4815-
read, write, err = select.select([sd], [], [], 1.0)
4816-
self.assertEqual(read, [sd])
4817-
self.assertEqual(sd.recv(1), b'')
4816+
read, write, err = select.select([conn], [], [], 1.0)
4817+
self.assertEqual(read, [conn])
4818+
self.assertEqual(conn.recv(1), b'')
48184819

48194820
# Calling close() many times should be safe.
48204821
conn.close()

Tools/tsan/suppressions_free_threading.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ race:set_allocator_unlocked
1515
# These entries are for warnings that trigger in a library function, as called
1616
# by a CPython function.
1717

18-
# https://gist.github.com/swtaarrs/8e0e365e1d9cecece3269a2fb2f2b8b8
19-
race:sock_recv_impl
2018
# https://gist.github.com/swtaarrs/08dfe7883b4c975c31ecb39388987a67
2119
race:free_threadstate
2220

0 commit comments

Comments
 (0)