testCmsgTrunc1, testCmsgTrunc2Int, testCmsgTruncLen0, testCmsgTruncLen0Minus1,
testCmsgTruncLen0Plus1, testCmsgTruncLen1, testCmsgTruncLen2Minus1,
testSingleCmsgTrunc1, testSingleCmsgTrunc2Int, testSingleCmsgTruncInData,
testSingleCmsgTruncLen0Minus1, testSecondCmsgTrunc1, testSecondCmsgTrunc2Int,
testSecondCmsgTruncInData, testSecondCmsgTruncLen0Minus1
File ".../Lib/test/test_socket.py", line 3427, in doRecvmsg
result = sock.recvmsg_into([buf], *args)
OSError: [Errno 40] Message too long
This is a kernel behavioral difference: these BSDs reject an undersized control buffer rather than truncating. NetBSD is unaffected (the truncation tests pass there, see gh-125860). FreeBSD and Linux are unaffected.
The tests should tolerate EMSGSIZE (or be skipped) on OpenBSD and DragonFly.
Bug report
Several
recvmsg()control-message truncation tests intest_socketfail on OpenBSD 7 and DragonFly 6:The tests pass an ancillary-data buffer deliberately too small and expect
recvmsg()to return the data withMSG_CTRUNCset. On OpenBSD and DragonFly the call instead fails withOSError: [Errno 40] Message too long(EMSGSIZE):This is a kernel behavioral difference: these BSDs reject an undersized control buffer rather than truncating. NetBSD is unaffected (the truncation tests pass there, see gh-125860). FreeBSD and Linux are unaffected.
The tests should tolerate EMSGSIZE (or be skipped) on OpenBSD and DragonFly.
Linked PRs