The virt type for QEMU can be modified by -machine attribute "accel" so there is no need to have different QEMU binary paths. Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- .../qemuxml2argv-default-kvm-host-arch.args | 2 +- .../qemuxml2xmlout-default-kvm-host-arch.xml | 2 +- tests/testutilsqemu.c | 42 ++++++++++------------ tests/vircapstest.c | 2 +- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-default-kvm-host-arch.args b/tests/qemuxml2argvdata/qemuxml2argv-default-kvm-host-arch.args index 39195f27de..093af38e08 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-default-kvm-host-arch.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-default-kvm-host-arch.args @@ -4,7 +4,7 @@ HOME=/home/test \ USER=test \ LOGNAME=test \ QEMU_AUDIO_DRV=none \ -/usr/bin/kvm \ +/usr/bin/qemu-system-x86_64 \ -name kvm \ -S \ -machine pc,accel=kvm \ diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-default-kvm-host-arch.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-default-kvm-host-arch.xml index 6718df340d..a1af050430 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-default-kvm-host-arch.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-default-kvm-host-arch.xml @@ -13,7 +13,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/kvm</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 317bfb7732..d3d62df9d1 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -95,22 +95,18 @@ static virCPUDef cpuPower8Data = { }; typedef enum { - TEST_UTILS_QEMU_BIN_I686_HVM, - TEST_UTILS_QEMU_BIN_I686_KVM, - TEST_UTILS_QEMU_BIN_X86_64_HVM, - TEST_UTILS_QEMU_BIN_X86_64_KVM, - TEST_UTILS_QEMU_BIN_AARCH64_HVM, - TEST_UTILS_QEMU_BIN_ARM_HVM, - TEST_UTILS_QEMU_BIN_PPC64_HVM, - TEST_UTILS_QEMU_BIN_PPC_HVM, - TEST_UTILS_QEMU_BIN_S390X_HVM + TEST_UTILS_QEMU_BIN_I686, + TEST_UTILS_QEMU_BIN_X86_64, + TEST_UTILS_QEMU_BIN_AARCH64, + TEST_UTILS_QEMU_BIN_ARM, + TEST_UTILS_QEMU_BIN_PPC64, + TEST_UTILS_QEMU_BIN_PPC, + TEST_UTILS_QEMU_BIN_S390X } QEMUBinType; static const char *QEMUBinList[] = { - "/usr/bin/qemu", - "/usr/bin/qemu-kvm", + "/usr/bin/qemu-system-i686", "/usr/bin/qemu-system-x86_64", - "/usr/bin/kvm", "/usr/bin/qemu-system-aarch64", "/usr/bin/qemu-system-arm", "/usr/bin/qemu-system-ppc64", @@ -179,7 +175,7 @@ testQemuAddI686Guest(virCapsPtr caps) if (!(guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_I686, - QEMUBinList[TEST_UTILS_QEMU_BIN_I686_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_I686], NULL, nmachines, machines))) @@ -203,7 +199,7 @@ testQemuAddI686Guest(virCapsPtr caps) if (!virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_KVM, - QEMUBinList[TEST_UTILS_QEMU_BIN_I686_KVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_I686], NULL, nmachines, machines)) @@ -230,7 +226,7 @@ testQemuAddX86_64Guest(virCapsPtr caps) if (!(guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64, - QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64], NULL, nmachines, machines))) @@ -254,7 +250,7 @@ testQemuAddX86_64Guest(virCapsPtr caps) if (!virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_KVM, - QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64_KVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64], NULL, nmachines, machines)) @@ -264,7 +260,7 @@ testQemuAddX86_64Guest(virCapsPtr caps) if (!virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_KVM, - QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64_KVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_X86_64], NULL, 0, NULL)) @@ -289,7 +285,7 @@ static int testQemuAddPPC64Guest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64, - QEMUBinList[TEST_UTILS_QEMU_BIN_PPC64_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_PPC64], NULL, 1, machines); if (!guest) goto error; @@ -316,7 +312,7 @@ static int testQemuAddPPC64LEGuest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64LE, - QEMUBinList[TEST_UTILS_QEMU_BIN_PPC64_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_PPC64], NULL, 1, machines); if (!guest) goto error; @@ -346,7 +342,7 @@ static int testQemuAddPPCGuest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC, - QEMUBinList[TEST_UTILS_QEMU_BIN_PPC_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_PPC], NULL, 1, machines); if (!guest) goto error; @@ -375,7 +371,7 @@ static int testQemuAddS390Guest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_S390X, - QEMUBinList[TEST_UTILS_QEMU_BIN_S390X_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_S390X], NULL, ARRAY_CARDINALITY(s390_machines), machines); @@ -406,7 +402,7 @@ static int testQemuAddArmGuest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_ARMV7L, - QEMUBinList[TEST_UTILS_QEMU_BIN_ARM_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_ARM], NULL, ARRAY_CARDINALITY(machines), capsmachines); @@ -435,7 +431,7 @@ static int testQemuAddAARCH64Guest(virCapsPtr caps) goto error; guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_AARCH64, - QEMUBinList[TEST_UTILS_QEMU_BIN_AARCH64_HVM], + QEMUBinList[TEST_UTILS_QEMU_BIN_AARCH64], NULL, ARRAY_CARDINALITY(machines), capsmachines); diff --git a/tests/vircapstest.c b/tests/vircapstest.c index bc6362dc4c..95829133d0 100644 --- a/tests/vircapstest.c +++ b/tests/vircapstest.c @@ -234,7 +234,7 @@ test_virCapsDomainDataLookupQEMU(const void *data ATTRIBUTE_UNUSED) VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-aarch64", "virt"); CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM, NULL, NULL, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64, - VIR_DOMAIN_VIRT_KVM, "/usr/bin/kvm", "pc"); + VIR_DOMAIN_VIRT_KVM, "/usr/bin/qemu-system-x86_64", "pc"); CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, "/usr/bin/qemu-system-ppc64", NULL, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64, VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries"); -- 2.12.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list