Commit 407380f6 authored by Christian Heimes's avatar Christian Heimes

Issue 27744: skip test if AF_ALG socket bind fails

parent ea9b2dc9
...@@ -5343,7 +5343,11 @@ class LinuxKernelCryptoAPI(unittest.TestCase): ...@@ -5343,7 +5343,11 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
# tests for AF_ALG # tests for AF_ALG
def create_alg(self, typ, name): def create_alg(self, typ, name):
sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
sock.bind((typ, name)) try:
sock.bind((typ, name))
except FileNotFoundError as e:
# type / algorithm is not available
raise unittest.SkipTest(str(e), typ, name)
return sock return sock
def test_sha256(self): def test_sha256(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment