5c27b6
From eb83a2ac219b229580faaae38422b7129076b70a Mon Sep 17 00:00:00 2001
5c27b6
Message-Id: <eb83a2ac219b229580faaae38422b7129076b70a@dist-git>
5c27b6
From: Jiri Denemark <jdenemar@redhat.com>
5c27b6
Date: Thu, 4 May 2017 10:41:43 +0200
5c27b6
Subject: [PATCH] RHEL: qemuxml2argvtest: Properly reset host CPU arch
5c27b6
5c27b6
RHEL-only, upstream reworked the way host CPUs and architectures are
5c27b6
set.
5c27b6
5c27b6
driver.caps->host.cpu->arch and cpuDefault point to the same structure
5c27b6
and the line did not really do anything leaving the host CPU arch set to
5c27b6
VIR_ARCH_AARCH64. Without this fix qemuxml2argvtest would segfault after
5c27b6
the following patch.
5c27b6
5c27b6
https://bugzilla.redhat.com/show_bug.cgi?id=1447612
5c27b6
5c27b6
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
5c27b6
---
5c27b6
 tests/qemuxml2argvtest.c | 2 +-
5c27b6
 1 file changed, 1 insertion(+), 1 deletion(-)
5c27b6
5c27b6
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
5c27b6
index dc5580e02..cbf785e1b 100644
5c27b6
--- a/tests/qemuxml2argvtest.c
5c27b6
+++ b/tests/qemuxml2argvtest.c
5c27b6
@@ -1956,7 +1956,7 @@ mymain(void)
5c27b6
     DO_TEST_FAILURE("aarch64-kvm-32-on-64",
5c27b6
             QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
5c27b6
             QEMU_CAPS_KVM);
5c27b6
-    driver.caps->host.cpu->arch = cpuDefault->arch;
5c27b6
+    driver.caps->host.cpu->arch = VIR_ARCH_X86_64;
5c27b6
 
5c27b6
     DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
5c27b6
     DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
5c27b6
-- 
5c27b6
2.12.2
5c27b6