aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/opencrypto/cryptodev.py
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-06-01 19:27:38 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-06-01 19:27:38 +0000
commit78dd739ff36a2427ed02c41c2874658fe7fb8b8e (patch)
tree15ab36cfc99bd7bb639d88114ee889921aa7ec16 /tests/sys/opencrypto/cryptodev.py
parent3fab177f90d39618c9a15ebf1db796d3f9eef725 (diff)
downloadsrc-78dd739ff36a2427ed02c41c2874658fe7fb8b8e.tar.gz
src-78dd739ff36a2427ed02c41c2874658fe7fb8b8e.zip
Honor the requested crid when running a test.
Otherwise, the kernel is free to choose an aribtrary crypto device rather than the requested device subverting tests that force the use of a specific device. MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10762
Notes
Notes: svn path=/head/; revision=319454
Diffstat (limited to 'tests/sys/opencrypto/cryptodev.py')
-rw-r--r--tests/sys/opencrypto/cryptodev.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/sys/opencrypto/cryptodev.py b/tests/sys/opencrypto/cryptodev.py
index d9f764adf7d1..afe075d7de86 100644
--- a/tests/sys/opencrypto/cryptodev.py
+++ b/tests/sys/opencrypto/cryptodev.py
@@ -173,10 +173,7 @@ class Crypto:
if not cipher and not mac:
raise ValueError('one of cipher or mac MUST be specified.')
- ses.crid = CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_HARDWARE
- #ses.crid = CRYPTOCAP_F_HARDWARE
- #ses.crid = CRYPTOCAP_F_SOFTWARE
- #ses.crid = 0
+ ses.crid = crid
#print `ses`
s = array.array('B', ses.pack_hdr())
#print `s`