From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: drjones@redhat.com, dgibson@redhat.com, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
Date: Wed, 20 Apr 2016 11:45:42 +0000 [thread overview]
Message-ID: <57176BE6.1090701@redhat.com> (raw)
In-Reply-To: <1461152447-11381-1-git-send-email-lvivier@redhat.com>
On 20.04.2016 13:40, 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.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> v2: move report("partial",...) out of #if..#endif block
>
> powerpc/emulator.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> 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");
>
> #if __BYTE_ORDER__ = __ORDER_LITTLE_ENDIAN__
> - report("alignment", alignment);
> - return;
> -#else
> - report("partial", regs[0] = 0x01020300 && regs[1] = (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] = 0x01020300 && regs[1] = (uint64_t)-1);
>
> /* check an old know bug: the number of bytes is used as
> * the number of registers, so try 32 bytes.
>
Looks fine!
Reviewed-by: Thomas Huth <thuth@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: drjones@redhat.com, dgibson@redhat.com, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
Date: Wed, 20 Apr 2016 13:45:42 +0200 [thread overview]
Message-ID: <57176BE6.1090701@redhat.com> (raw)
In-Reply-To: <1461152447-11381-1-git-send-email-lvivier@redhat.com>
On 20.04.2016 13:40, 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.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> v2: move report("partial",...) out of #if..#endif block
>
> powerpc/emulator.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> 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");
>
> #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
> - report("alignment", alignment);
> - return;
> -#else
> - report("partial", regs[0] == 0x01020300 && regs[1] == (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] == 0x01020300 && regs[1] == (uint64_t)-1);
>
> /* check an old know bug: the number of bytes is used as
> * the number of registers, so try 32 bytes.
>
Looks fine!
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2016-04-20 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 11:40 [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception Laurent Vivier
2016-04-20 11:40 ` Laurent Vivier
2016-04-20 11:45 ` Thomas Huth [this message]
2016-04-20 11:45 ` Thomas Huth
2016-04-20 23:22 ` David Gibson
2016-04-20 23:22 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57176BE6.1090701@redhat.com \
--to=thuth@redhat.com \
--cc=dgibson@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.