Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-123695: fix race:sock_recv_impl suppressions for free-thread building
Signed-off-by: Manjusaka <[email protected]>
  • Loading branch information
Zheaoli committed Sep 4, 2024
commit 58ff9b3ad8aa74c37b82a7a0d8a1076bb9dc22e0
9 changes: 5 additions & 4 deletions Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -4806,15 +4806,16 @@ def testInterruptedSendmsgTimeout(self):


class TCPCloserTest(ThreadedTCPSocketTest):
def __init__(self, methodName='runTest'):
super().__init__(methodName)

def testClose(self):
conn, addr = self.serv.accept()
conn.close()

sd = self.cli
read, write, err = select.select([sd], [], [], 1.0)
self.assertEqual(read, [sd])
self.assertEqual(sd.recv(1), b'')
read, write, err = select.select([conn], [], [], 1.0)
self.assertEqual(read, [conn])
self.assertEqual(conn.recv(1), b'')

# Calling close() many times should be safe.
conn.close()
Expand Down
2 changes: 0 additions & 2 deletions Tools/tsan/suppressions_free_threading.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ race:set_allocator_unlocked
# These entries are for warnings that trigger in a library function, as called
# by a CPython function.

# https://gist.github.com/swtaarrs/8e0e365e1d9cecece3269a2fb2f2b8b8
race:sock_recv_impl
# https://gist.github.com/swtaarrs/08dfe7883b4c975c31ecb39388987a67
race:free_threadstate

Expand Down
Loading