]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-143637: Fix test_socket.test_sendmsg_reentrant_ancillary_mutation() on Solaris...
authorVictor Stinner <vstinner@python.org>
Tue, 17 Feb 2026 09:49:30 +0000 (10:49 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Feb 2026 09:49:30 +0000 (10:49 +0100)
Use socket.SCM_RIGHTS operation.

Lib/test/test_socket.py

index 3806ad988db21465080c4f064ea3f236057d693d..9ad5b29ea58ecb21eb43ccb5f81bd4efa81a9f36 100644 (file)
@@ -2228,11 +2228,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()