svn commit: r346614 - head/tests/sys/opencrypto
John Baldwin
jhb at FreeBSD.org
Tue Sep 3 14:08:20 UTC 2019
Author: jhb
Date: Wed Apr 24 00:10:21 2019
New Revision: 346614
URL: https://svnweb.freebsd.org/changeset/base/346614
Log:
Skip tests with missing test vectors instead of failing.
This copes more gracefully when older version of the nist-kat package
are intalled that don't have newer test vectors such as CCM or plain
SHA.
If the nist-kat package is not installed at all, this still fails with
an error.
Reviewed by: cem
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D20034
Modified:
head/tests/sys/opencrypto/cryptotest.py
Modified: head/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- head/tests/sys/opencrypto/cryptotest.py Tue Apr 23 22:43:47 2019 (r346613)
+++ head/tests/sys/opencrypto/cryptotest.py Wed Apr 24 00:10:21 2019 (r346614)
@@ -42,7 +42,9 @@ from glob import iglob
katdir = '/usr/local/share/nist-kat'
def katg(base, glob):
- assert os.path.exists(os.path.join(katdir, base)), "Please 'pkg install nist-kat'"
+ assert os.path.exists(katdir), "Please 'pkg install nist-kat'"
+ if not os.path.exists(os.path.join(katdir, base)):
+ raise unittest.SkipTest("Missing %s test vectors" % (base))
return iglob(os.path.join(katdir, base, glob))
aesmodules = [ 'cryptosoft0', 'aesni0', 'ccr0', 'ccp0' ]
More information about the svn-src-all
mailing list