mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
tests: don't use different QEMU binary paths for different virt types
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@redhat.com>
This commit is contained in:
parent
3a2c08ad32
commit
e9a85a6e4f
@ -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 \
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user