mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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>
This commit is contained in:
parent
54e7aac056
commit
9250036221
3 changed files with 186 additions and 0 deletions
24
configure
vendored
24
configure
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue