]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-139310: skip `test_aead_aes_gcm` for Linux kernel between 6.16.0 and 6...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Oct 2025 08:52:06 +0000 (10:52 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Oct 2025 08:52:06 +0000 (08:52 +0000)
gh-139310: skip `test_aead_aes_gcm` for Linux kernel between 6.16.0 and 6.17.x (GH-139552)

Currently, Fedora 42 uses a custom Linux Kernel 6.16.9 that backported an upstream change
from 6.17-rc7 [1,3] but not its subsequent fix [2]. Until the issue is resolved upstream,
we skip the failing test `test_socket.test_aead_aes_gcm` for kernel versions between 6.16
and 6.17.x.

[1] https://github.com/torvalds/linux/commit/1b34cbbf4f011a121ef7b2d7d6e6920a036d5285
[2] https://github.com/torvalds/linux/commit/d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb
[3] https://gitlab.com/cki-project/kernel-ark/-/commit/45bcf60fe49b37daab1acee57b27211ad1574042
(cherry picked from commit 41712c4e095b2cc988febfe3887616c2779c6210)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Lib/test/support/__init__.py
Lib/test/test_socket.py

index ce1fdbaf719fc23958f2444b5b86af4c27fbb416..4605938b875ad406ddf4b9157de1dcd9a147c9a3 100644 (file)
@@ -305,6 +305,16 @@ def requires(resource, msg=None):
     if resource == 'gui' and not _is_gui_available():
         raise ResourceDenied(_is_gui_available.reason)
 
+def _get_kernel_version(sysname="Linux"):
+    import platform
+    if platform.system() != sysname:
+        return None
+    version_txt = platform.release().split('-', 1)[0]
+    try:
+        return tuple(map(int, version_txt.split('.')))
+    except ValueError:
+        return None
+
 def _requires_unix_version(sysname, min_version):
     """Decorator raising SkipTest if the OS is `sysname` and the version is less
     than `min_version`.
index d33cc052d1cd4fe82ffc9bb0b04412c33e43212e..24b1fe3a443a874b90e31fb1d7c66c169c5306ac 100644 (file)
@@ -6924,8 +6924,14 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
             self.assertEqual(len(dec), msglen * multiplier)
             self.assertEqual(dec, msg * multiplier)
 
-    @support.requires_linux_version(4, 9)  # see issue29324
+    @support.requires_linux_version(4, 9)  # see gh-73510
     def test_aead_aes_gcm(self):
+        kernel_version = support._get_kernel_version("Linux")
+        if kernel_version is not None:
+            if kernel_version >= (6, 16) and kernel_version < (6, 18):
+                # See https://github.com/python/cpython/issues/139310.
+                self.skipTest("upstream Linux kernel issue")
+
         key = bytes.fromhex('c939cc13397c1d37de6ae0e1cb7c423c')
         iv = bytes.fromhex('b3d8cc017cbb89b39e0f67e2')
         plain = bytes.fromhex('c3b3c41f113a31b73d9a5cd432103069')