Page MenuHomeFreeBSD

D16755.diff
No OneTemporary

D16755.diff

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

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)

Event Timeline