From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception Date: Thu, 21 Apr 2016 09:22:26 +1000 Message-ID: <20160421092226.77a375e3@voom.fritz.box> References: <1461152447-11381-1-git-send-email-lvivier@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/SP.E74EVHYz5+lLgZEQO+hB"; protocol="application/pgp-signature" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com, thuth@redhat.com, pbonzini@redhat.com To: Laurent Vivier Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41337 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbcDTXVM (ORCPT ); Wed, 20 Apr 2016 19:21:12 -0400 In-Reply-To: <1461152447-11381-1-git-send-email-lvivier@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: --Sig_/SP.E74EVHYz5+lLgZEQO+hB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 20 Apr 2016 13:40:47 +0200 Laurent Vivier wrote: > As for lswi, lswx is supposed to cause an alignment exception in > little endian mode, but QEMU does not support it. So in case we do > not get an exception, this is an expected failure and we run the other > tests. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > v2: move report("partial",...) out of #if..#endif block >=20 > powerpc/emulator.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) >=20 > diff --git a/powerpc/emulator.c b/powerpc/emulator.c > index 4dc341f..0e5f7a3 100644 > --- a/powerpc/emulator.c > +++ b/powerpc/emulator.c > @@ -245,11 +245,18 @@ static void test_lswx(void) > "xer", "r11", "r12", "memory"); > =20 > #if __BYTE_ORDER__ =3D=3D __ORDER_LITTLE_ENDIAN__ > - report("alignment", alignment); > - return; > -#else > - report("partial", regs[0] =3D=3D 0x01020300 && regs[1] =3D=3D (uint64_t= )-1); > + /* > + * lswx is supposed to cause an alignment exception in little endian > + * mode, but QEMU does not support it. So in case we do not get an > + * exception, this is an expected failure and we run the other tests > + */ > + report_xfail("alignment", !alignment, alignment); > + if (alignment) { > + report_prefix_pop(); > + return; > + } > #endif > + report("partial", regs[0] =3D=3D 0x01020300 && regs[1] =3D=3D (uint64_t= )-1); > =20 > /* check an old know bug: the number of bytes is used as > * the number of registers, so try 32 bytes. > --=20 > 2.5.5 >=20 --=20 David Gibson Senior Software Engineer, Virtualization, Red Hat --Sig_/SP.E74EVHYz5+lLgZEQO+hB Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXGA8yAAoJEGw4ysog2bOSlYAQAMV/cCm380Zr3zsWXtOmI0cE BokbY0sRJgaDHphUdGZI48lm8GMmue41s5bkYII7FDzgVLeGd3ma7rkRxyx5BY5I PULfLI5nLfRBxuZuVmEe256pvwIxP+7Ax08PYmtcSYFAxnj9cHicMHADtv0JFQ+Y kEHw/AneoZOLEfivDBMZfzZGxYpo5iwV4EvATWapFJY6R/htYe/mwESBdgFgHAxh 0YkcEO/PuP2DcTJ1dWGAcGdMfyXVanI3DUKzLAtKmEHpaTtv7ihcuHonbpW8E8+I VKUkYAw2LcPCdMEo4lm5LEw9eBv90vpf2fypposrgmL6wZNbeP9c3Frcb20xepkG jAnglyzvI4PDEHIAtBXu8UxKb/6ydUN+AueW/Kzed1c1vN/8orgbfHmTruzXgLUU pV1R6qZhmdiBk8jPicfBT3mVWZ6GarYRs5NnVcCIAGlafz4BCULe5rSUL5OfQJhJ gFMqbAs8wpgEA12W+oHM3y30G5x9hAeEH1MDfgCfEsub7eTmrE6o/tVt2mKAlmNf nmXwPQY7VnWEZ3BSvoRstm3RefnojyIKNcG6u4BhTQTw4Gjy+gC3OVYFflnj+Q4G InldmiNhaxozMJNgyjl9afNM5bPXrZ+u35Pm0LbXuosn0TFmvuBELqUg29L213jB KA+Vwt/0cgIUs7lW1WXK =Wy2/ -----END PGP SIGNATURE----- --Sig_/SP.E74EVHYz5+lLgZEQO+hB--