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 @@ -571,6 +571,16 @@ def requires(resource, msg=None):
571571 if resource == 'gui' and not _is_gui_available ():
572572 raise ResourceDenied (_is_gui_available .reason )
573573
574+ def _get_kernel_version (sysname = "Linux" ):
575+ import platform
576+ if platform .system () != sysname :
577+ return None
578+ version_txt = platform .release ().split ('-' , 1 )[0 ]
579+ try :
580+ return tuple (map (int , version_txt .split ('.' )))
581+ except ValueError :
582+ return None
583+
574584def _requires_unix_version (sysname , min_version ):
575585 """Decorator raising SkipTest if the OS is `sysname` and the version is less
576586 than `min_version`.
Original file line number Diff line number Diff line change @@ -6452,8 +6452,14 @@ def test_aes_cbc(self):
64526452 self .assertEqual (len (dec ), msglen * multiplier )
64536453 self .assertEqual (dec , msg * multiplier )
64546454
6455- @support .requires_linux_version (4 , 9 ) # see issue29324
6455+ @support .requires_linux_version (4 , 9 ) # see gh-73510
64566456 def test_aead_aes_gcm (self ):
6457+ kernel_version = support ._get_kernel_version ("Linux" )
6458+ if kernel_version is not None :
6459+ if kernel_version >= (6 , 16 ) and kernel_version < (6 , 18 ):
6460+ # See https://github.com/python/cpython/issues/139310.
6461+ self .skipTest ("upstream Linux kernel issue" )
6462+
64576463 key = bytes .fromhex ('c939cc13397c1d37de6ae0e1cb7c423c' )
64586464 iv = bytes .fromhex ('b3d8cc017cbb89b39e0f67e2' )
64596465 plain = bytes .fromhex ('c3b3c41f113a31b73d9a5cd432103069' )
You can’t perform that action at this time.
0 commit comments