* [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
@ 2016-04-20 11:40 ` Laurent Vivier
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2016-04-20 11:40 UTC (permalink / raw)
To: kvm, kvm-ppc; +Cc: drjones, thuth, dgibson, pbonzini, Laurent Vivier
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.
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
@ 2016-04-20 11:40 ` Laurent Vivier
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2016-04-20 11:40 UTC (permalink / raw)
To: kvm, kvm-ppc; +Cc: drjones, thuth, dgibson, pbonzini, Laurent Vivier
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.
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
2016-04-20 11:40 ` Laurent Vivier
@ 2016-04-20 11:45 ` Thomas Huth
-1 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2016-04-20 11:45 UTC (permalink / raw)
To: Laurent Vivier, kvm, kvm-ppc; +Cc: drjones, dgibson, pbonzini
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
@ 2016-04-20 11:45 ` Thomas Huth
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2016-04-20 11:45 UTC (permalink / raw)
To: Laurent Vivier, kvm, kvm-ppc; +Cc: drjones, dgibson, pbonzini
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
2016-04-20 11:40 ` Laurent Vivier
@ 2016-04-20 23:22 ` David Gibson
-1 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2016-04-20 23:22 UTC (permalink / raw)
To: Laurent Vivier; +Cc: kvm, kvm-ppc, drjones, thuth, pbonzini
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
On Wed, 20 Apr 2016 13:40:47 +0200
Laurent Vivier <lvivier@redhat.com> 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>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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.
> --
> 2.5.5
>
--
David Gibson <dgibson@redhat.com>
Senior Software Engineer, Virtualization, Red Hat
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests PATCH v2] powerpc: don't fail if QEMU does not support alignment exception
@ 2016-04-20 23:22 ` David Gibson
0 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2016-04-20 23:22 UTC (permalink / raw)
To: Laurent Vivier; +Cc: kvm, kvm-ppc, drjones, thuth, pbonzini
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
On Wed, 20 Apr 2016 13:40:47 +0200
Laurent Vivier <lvivier@redhat.com> 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>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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.
> --
> 2.5.5
>
--
David Gibson <dgibson@redhat.com>
Senior Software Engineer, Virtualization, Red Hat
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-20 23:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-04-20 11:45 ` Thomas Huth
2016-04-20 23:22 ` David Gibson
2016-04-20 23:22 ` David Gibson
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.