summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-10-03 17:43:15 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-10-03 17:43:15 (GMT)
commit8619cd7376a3614946c41caca9b01948ebac084e (patch)
tree487f588ff9a57948d8ce1f3fef1d1b3e7abe06e6 /Lib/test/test_socket.py
parent87b3c92b5b8051450be24b6a3eef09c9589e1adb (diff)
downloadcpython-8619cd7376a3614946c41caca9b01948ebac084e.zip
cpython-8619cd7376a3614946c41caca9b01948ebac084e.tar.gz
cpython-8619cd7376a3614946c41caca9b01948ebac084e.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 06b9a0d..79160f4 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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)