Received: from eggs.gnu.org ([2001:4830:134:3::10]:35764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLkG-00047q-Ak for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:11:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVLkF-0006Vo-Fc for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:11:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLkF-0006Va-9i for qemu-devel@nongnu.org; Mon, 15 Feb 2016 11:11:27 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id A20688F4FF for ; Mon, 15 Feb 2016 16:11:26 +0000 (UTC) From: "Daniel P. Berrange" Date: Mon, 15 Feb 2016 16:10:38 +0000 Message-Id: <1455552659-14000-6-git-send-email-berrange@redhat.com> In-Reply-To: <1455552659-14000-1-git-send-email-berrange@redhat.com> References: <1455552659-14000-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH v3 05/26] crypto: skip testing of unsupported cipher algorithms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng We don't guarantee that all crypto backends will support all cipher algorithms, so we should skip tests unless the crypto backend indicates support. Signed-off-by: Daniel P. Berrange --- tests/test-crypto-cipher.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-crypto-cipher.c b/tests/test-crypto-cipher.c index c687307..3747efa 100644 --- a/tests/test-crypto-cipher.c +++ b/tests/test-crypto-cipher.c @@ -379,7 +379,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", -- 2.5.0