Issue #13001: Fix test_socket.testRecvmsgTrunc failure on FreeBSD < 8, which

doesn't always set the MSG_TRUNC flag when a truncated datagram is received.
This commit is contained in:
Charles-François Natali 2011-10-03 19:43:15 +02:00
parent 87b3c92b5b
commit 8619cd7376
1 changed files with 4 additions and 0 deletions

View File

@ -1659,6 +1659,9 @@ class RecvmsgGenericTests(SendrecvmsgBase):
def _testRecvmsgShorter(self):
self.sendToServer(MSG)
# FreeBSD < 8 doesn't always set the MSG_TRUNC flag when a truncated
# datagram is received (issue #13001).
@support.requires_freebsd_version(8)
def testRecvmsgTrunc(self):
# Receive part of message, check for truncation indicators.
msg, ancdata, flags, addr = self.doRecvmsg(self.serv_sock,
@ -1668,6 +1671,7 @@ class RecvmsgGenericTests(SendrecvmsgBase):
self.assertEqual(ancdata, [])
self.checkFlags(flags, eor=False)
@support.requires_freebsd_version(8)
def _testRecvmsgTrunc(self):
self.sendToServer(MSG)