aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAlexey Krasikov <alex-krasikov@yandex-team.ru>2020-05-25 14:19:13 +0300
committerDaniel P. Berrangé <berrange@redhat.com>2020-06-15 11:33:51 +0100
commit92500362210268faf4ae81644a66a7616d6bde1d (patch)
tree6cf21b0562de523c7f32670a801f97c89d060fba /configure
parent54e7aac0562452e4fcab65ca5001d030eef2de15 (diff)
downloadqemu-92500362210268faf4ae81644a66a7616d6bde1d.zip
qemu-92500362210268faf4ae81644a66a7616d6bde1d.tar.gz
qemu-92500362210268faf4ae81644a66a7616d6bde1d.tar.bz2
test-crypto-secret: add 'secret_keyring' object tests.
Add tests: test_secret_keyring_good; test_secret_keyring_revoked_key; test_secret_keyring_expired_key; test_secret_keyring_bad_serial_key; test_secret_keyring_bad_key_access_right; Added tests require libkeyutils. The absence of this library is not critical, because these tests will be skipped in this case. Signed-off-by: Alexey Krasikov <alex-krasikov@yandex-team.ru> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure
index 3fbb619..07202ac 100755
--- a/configure
+++ b/configure
@@ -6330,6 +6330,27 @@ but not implemented on your system"
fi
fi
+##########################################
+# check for usable keyutils.h
+
+if test "$linux" = "yes" ; then
+
+ have_keyutils=no
+ cat > $TMPC << EOF
+#include <errno.h>
+#include <asm/unistd.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <keyutils.h>
+int main(void) {
+ return request_key("user", NULL, NULL, 0);
+}
+EOF
+ if compile_prog "" "-lkeyutils"; then
+ have_keyutils=yes
+ fi
+fi
+
##########################################
# End of CC checks
@@ -7702,6 +7723,9 @@ fi
if test "$secret_keyring" = "yes" ; then
echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak
+ if test "$have_keyutils" = "yes" ; then
+ echo "CONFIG_TEST_SECRET_KEYRING=y" >> $config_host_mak
+ fi
fi
if test "$tcg_interpreter" = "yes"; then