]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix tests in test_socket to use correctly CMSG_LEN (GH-9594)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 27 Sep 2018 13:30:55 +0000 (06:30 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Sep 2018 13:30:55 +0000 (06:30 -0700)
commitfe48b6df101aac10dc846fa6fd1a41f877e77025
tree4c616b03bf9b065f45a3de345f682878ffa48ad1
parent3a4aa6ac55e04c42757443d5b5854b6d893e0461
Fix tests in test_socket to use correctly CMSG_LEN (GH-9594)

After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots
regarding tests in test_socket that are using
testFDPassSeparateMinSpace(), FreeBDS revision 337423 was pointed
out to be the reason the test started to fail.

A close examination of the manpage for cmsg_space(3) reveals that
the number of file descriptors needs to be taken into account when
using CMSG_LEN().

This commit fixes tests in test_socket to use correctly CMSG_LEN, taking
into account the number of FDs.
(cherry picked from commit 7291108d88ea31d205da4db19d202d6cbffc6d93)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Lib/test/test_socket.py