]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-143637: Fix test_socket.test_sendmsg_reentrant_ancillary_mutation() on...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Feb 2026 10:16:21 +0000 (11:16 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Feb 2026 10:16:21 +0000 (10:16 +0000)
gh-143637: Fix test_socket.test_sendmsg_reentrant_ancillary_mutation() on Solaris (GH-144890)

Use socket.SCM_RIGHTS operation.
(cherry picked from commit 63531a3867cf4f8b5a7088fb7667d33534c43ff7)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_socket.py

index 1991d68501a4c7a7150d797c4e3028b6a4810c4c..c3fe183890d840254874d5124ffa138f87860d49 100644 (file)
@@ -2182,11 +2182,11 @@ class GeneralModuleTests(unittest.TestCase):
         class Mut:
             def __index__(self):
                 seq.clear()
-                return 0
+                return socket.SCM_RIGHTS
 
         seq = [
-            (socket.SOL_SOCKET, Mut(), b'x'),
-            (socket.SOL_SOCKET, 0, b'x'),
+            (socket.SOL_SOCKET, Mut(), b'xxxx'),
+            (socket.SOL_SOCKET, socket.SCM_RIGHTS, b'xxxx'),
         ]
 
         left, right = socket.socketpair()