File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,16 @@ def requires(resource, msg=None):
300
300
if resource == 'gui' and not _is_gui_available ():
301
301
raise ResourceDenied (_is_gui_available .reason )
302
302
303
+ def _get_kernel_version (sysname = "Linux" ):
304
+ import platform
305
+ if platform .system () != sysname :
306
+ return None
307
+ version_txt = platform .release ().split ('-' , 1 )[0 ]
308
+ try :
309
+ return tuple (map (int , version_txt .split ('.' )))
310
+ except ValueError :
311
+ return None
312
+
303
313
def _requires_unix_version (sysname , min_version ):
304
314
"""Decorator raising SkipTest if the OS is `sysname` and the version is less
305
315
than `min_version`.
Original file line number Diff line number Diff line change @@ -6680,8 +6680,14 @@ def test_aes_cbc(self):
6680
6680
self .assertEqual (len (dec ), msglen * multiplier )
6681
6681
self .assertEqual (dec , msg * multiplier )
6682
6682
6683
- @support .requires_linux_version (4 , 9 ) # see issue29324
6683
+ @support .requires_linux_version (4 , 9 ) # see gh-73510
6684
6684
def test_aead_aes_gcm (self ):
6685
+ kernel_version = support ._get_kernel_version ("Linux" )
6686
+ if kernel_version is not None :
6687
+ if kernel_version >= (6 , 16 ) and kernel_version < (6 , 18 ):
6688
+ # See https://github.com/python/cpython/issues/139310.
6689
+ self .skipTest ("upstream Linux kernel issue" )
6690
+
6685
6691
key = bytes .fromhex ('c939cc13397c1d37de6ae0e1cb7c423c' )
6686
6692
iv = bytes .fromhex ('b3d8cc017cbb89b39e0f67e2' )
6687
6693
plain = bytes .fromhex ('c3b3c41f113a31b73d9a5cd432103069' )
You can’t perform that action at this time.
0 commit comments