Skip to content

Commit 9cfa08c

Browse files
gh-125860: Skip separate-SCM_RIGHTS socket tests on NetBSD, OpenBSD and DragonFly (GH-154239)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 3d99861 commit 9cfa08c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_socket.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
VSOCKPORT = 1234
5656
AIX = platform.system() == "AIX"
5757
SOLARIS = sys.platform.startswith("sunos")
58+
# NetBSD, OpenBSD and DragonFly deliver the file descriptors from only one
59+
# SCM_RIGHTS control message when several are sent in a single sendmsg().
60+
BSD_COMBINES_SCM_RIGHTS = sys.platform.startswith(
61+
("netbsd", "openbsd", "dragonfly"))
5862
WSL = "microsoft-standard-WSL" in platform.release()
5963

6064
try:
@@ -4178,6 +4182,7 @@ def _testFDPassCMSG_LEN(self):
41784182
@unittest.skipIf(is_apple, "skipping, see issue #12958")
41794183
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
41804184
@unittest.skipIf(AIX, "skipping, see issue #22397")
4185+
@unittest.skipIf(BSD_COMBINES_SCM_RIGHTS, "skipping, see gh-125860")
41814186
@requireAttrs(socket, "CMSG_SPACE")
41824187
def testFDPassSeparate(self):
41834188
# Pass two FDs in two separate arrays. Arrays may be combined
@@ -4190,6 +4195,7 @@ def testFDPassSeparate(self):
41904195
@unittest.skipIf(is_apple, "skipping, see issue #12958")
41914196
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
41924197
@unittest.skipIf(AIX, "skipping, see issue #22397")
4198+
@unittest.skipIf(BSD_COMBINES_SCM_RIGHTS, "skipping, see gh-125860")
41934199
def _testFDPassSeparate(self):
41944200
fd0, fd1 = self.newFDs(2)
41954201
self.assertEqual(
@@ -4204,6 +4210,7 @@ def _testFDPassSeparate(self):
42044210
@unittest.skipIf(is_apple, "skipping, see issue #12958")
42054211
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
42064212
@unittest.skipIf(AIX, "skipping, see issue #22397")
4213+
@unittest.skipIf(BSD_COMBINES_SCM_RIGHTS, "skipping, see gh-125860")
42074214
@requireAttrs(socket, "CMSG_SPACE")
42084215
def testFDPassSeparateMinSpace(self):
42094216
# Pass two FDs in two separate arrays, receiving them into the
@@ -4219,6 +4226,7 @@ def testFDPassSeparateMinSpace(self):
42194226
@unittest.skipIf(is_apple, "skipping, see issue #12958")
42204227
@unittest.skipIf(SOLARIS, "skipping, see gh-91214")
42214228
@unittest.skipIf(AIX, "skipping, see issue #22397")
4229+
@unittest.skipIf(BSD_COMBINES_SCM_RIGHTS, "skipping, see gh-125860")
42224230
def _testFDPassSeparateMinSpace(self):
42234231
fd0, fd1 = self.newFDs(2)
42244232
self.assertEqual(

0 commit comments

Comments
 (0)