Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148204550
D16755.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16755.diff
View Options
Index: head/tests/freebsd_test_suite/macros.h
===================================================================
--- head/tests/freebsd_test_suite/macros.h
+++ head/tests/freebsd_test_suite/macros.h
@@ -31,6 +31,7 @@
#include <sys/param.h>
#include <sys/module.h>
+#include <sys/sysctl.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
@@ -50,6 +51,17 @@
atf_tc_skip("module %s could not be resolved: %s", \
_mod_name, strerror(errno)); \
} \
+} while(0)
+
+#define ATF_REQUIRE_SYSCTL_INT(_mib_name, _required_value) do { \
+ int value; \
+ size_t size = sizeof(value); \
+ if (sysctlbyname(_mib_name, &value, &size, NULL, 0) == -1) { \
+ atf_tc_skip("sysctl for %s failed: %s", _mib_name, \
+ strerror(errno)); \
+ } \
+ if (value != _required_value) \
+ atf_tc_skip("requires %s=%d", _mib_name, _required_value); \
} while(0)
#define PLAIN_REQUIRE_FEATURE(_feature_name, _exit_code) do { \
Index: head/tests/sys/opencrypto/blake2_test.c
===================================================================
--- head/tests/sys/opencrypto/blake2_test.c
+++ head/tests/sys/opencrypto/blake2_test.c
@@ -172,12 +172,14 @@
ATF_TC_WITHOUT_HEAD(blake2b_vectors);
ATF_TC_BODY(blake2b_vectors, tc)
{
+ ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
test_blake2b_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft");
}
ATF_TC_WITHOUT_HEAD(blake2s_vectors);
ATF_TC_BODY(blake2s_vectors, tc)
{
+ ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1);
test_blake2s_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft");
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 17, 12:05 PM (8 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29824029
Default Alt Text
D16755.diff (1 KB)
Attached To
Mode
D16755: fix sys/opencrypto/blake2_test when kern.cryptodevallowsoft=0
Attached
Detach File
Event Timeline
Log In to Comment