summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-02-10 18:46:55 +0100
committerDaniel P. Berrange2016-03-17 15:41:14 +0100
commitaa41363598735bae8d270023247da9ec0334605c (patch)
tree803e6a1d6f39ddc46da12013ad3d5e8cb1a86682
parentcrypto: add support for anti-forensic split algorithm (diff)
downloadqemu-aa41363598735bae8d270023247da9ec0334605c.tar.gz
qemu-aa41363598735bae8d270023247da9ec0334605c.tar.xz
qemu-aa41363598735bae8d270023247da9ec0334605c.zip
crypto: skip testing of unsupported cipher algorithms
We don't guarantee that all crypto backends will support all cipher algorithms, so we should skip tests unless the crypto backend indicates support. Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
-rw-r--r--tests/test-crypto-cipher.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-crypto-cipher.c b/tests/test-crypto-cipher.c
index 9f912eccb5..7a073e9673 100644
--- a/tests/test-crypto-cipher.c
+++ b/tests/test-crypto-cipher.c
@@ -380,7 +380,9 @@ int main(int argc, char **argv)
g_assert(qcrypto_init(NULL) == 0);
for (i = 0; i < G_N_ELEMENTS(test_data); i++) {
- g_test_add_data_func(test_data[i].path, &test_data[i], test_cipher);
+ if (qcrypto_cipher_supports(test_data[i].alg)) {
+ g_test_add_data_func(test_data[i].path, &test_data[i], test_cipher);
+ }
}
g_test_add_func("/crypto/cipher/null-iv",