[kvm-unit-tests PATCH] powerpc: don't fail if QEMU does not support alignment exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 powerpc/emulator.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/powerpc/emulator.c b/powerpc/emulator.c
index 4dc341f..9720723 100644
--- a/powerpc/emulator.c
+++ b/powerpc/emulator.c
@@ -245,8 +245,16 @@ static void test_lswx(void)
 		      "xer", "r11", "r12", "memory");
 
 #if  __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-	report("alignment", alignment);
-	return;
+	/*
+	 * 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;
+	}
 #else
 	report("partial", regs[0] == 0x01020300 && regs[1] == (uint64_t)-1);
 #endif
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux