From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeSSc-00082W-OR for qemu-devel@nongnu.org; Fri, 11 Mar 2016 14:10:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeSSb-0000oC-Li for qemu-devel@nongnu.org; Fri, 11 Mar 2016 14:10:54 -0500 References: <1456747261-22032-1-git-send-email-berrange@redhat.com> <1456747261-22032-6-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56E31836.7020408@redhat.com> Date: Fri, 11 Mar 2016 12:10:46 -0700 MIME-Version: 1.0 In-Reply-To: <1456747261-22032-6-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IA8hXVJPlN99GHcIuuIxvpLdLm3i5kXjd" Subject: Re: [Qemu-devel] [PATCH v4 05/26] crypto: skip testing of unsupported cipher algorithms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Fam Zheng , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IA8hXVJPlN99GHcIuuIxvpLdLm3i5kXjd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/29/2016 05:00 AM, Daniel P. Berrange wrote: > We don't guarantee that all crypto backends will support > all cipher algorithms, so we should skip tests unless > the crypto backend indicates support. >=20 > Signed-off-by: Daniel P. Berrange > --- > tests/test-crypto-cipher.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > diff --git a/tests/test-crypto-cipher.c b/tests/test-crypto-cipher.c > index 9f912ec..7a073e9 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) =3D=3D 0); > =20 > for (i =3D 0; i < G_N_ELEMENTS(test_data); i++) { > - g_test_add_data_func(test_data[i].path, &test_data[i], test_ci= pher); > + if (qcrypto_cipher_supports(test_data[i].alg)) { > + g_test_add_data_func(test_data[i].path, &test_data[i], tes= t_cipher); > + } > } > =20 > g_test_add_func("/crypto/cipher/null-iv", >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IA8hXVJPlN99GHcIuuIxvpLdLm3i5kXjd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW4xg2AAoJEKeha0olJ0NqRqMH/iKmxUJNhVcr3iUHfwKBIsnm Tv+ORh9EDtuNwI30qW5X7nqVHj14ZXVZFtM8Q2WgYIGR3wZBboXCFm+XSC+c9hhU 0iX9WnrKR9PGZ3L/mja10Hck0h63nKtkJsdxuD6RYNihoVSocwKjqstChqGtrxAc kC7j4RHNZlEgOq1OjFJ/VLvViNJRntrX6wmOEtEroDf8IeE46Qa8IyTRgL92NrYl bUXIif1GwZcIDPa/mnoOB/08AnRaJpOf8KFdMUABbtiKU6gva0pR6b9WOV8ikul9 oq34gz98L9MuMIPUduCu+/znVP9Kc0c+u5yRkOzctVzZXN+dNjzimdiXfx35xUo= =wtny -----END PGP SIGNATURE----- --IA8hXVJPlN99GHcIuuIxvpLdLm3i5kXjd--