mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-08 16:54:49 +00:00
tests: qemu: Unify fake machine types filled in for KVM and TCG caps of x86_64
For testing with synthetic capabilities we pre-fill the qemu capabilities with some machine types. Historically there were two arrays for KVM and TCG but that's not necessary. Make both instances of x86_64 data share the same array as the other architectures do. This will later on simplify filling in all the other machine types which are required for the test suite. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8dc3c6ea9f
commit
d29ee7c124
@ -10,7 +10,7 @@ QEMU_AUDIO_DRV=none \
|
|||||||
/usr/bin/qemu-system-x86_64 \
|
/usr/bin/qemu-system-x86_64 \
|
||||||
-name qemu-host \
|
-name qemu-host \
|
||||||
-S \
|
-S \
|
||||||
-machine pc-0.11,accel=tcg,usb=off,dump-guest-core=off \
|
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
||||||
-m 4096 \
|
-m 4096 \
|
||||||
-realtime mlock=off \
|
-realtime mlock=off \
|
||||||
-smp 4,sockets=4,cores=1,threads=1 \
|
-smp 4,sockets=4,cores=1,threads=1 \
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<currentMemory unit='KiB'>4194304</currentMemory>
|
<currentMemory unit='KiB'>4194304</currentMemory>
|
||||||
<vcpu placement='static'>4</vcpu>
|
<vcpu placement='static'>4</vcpu>
|
||||||
<os>
|
<os>
|
||||||
<type arch='x86_64' machine='pc-0.11'>hvm</type>
|
<type arch='x86_64' machine='pc'>hvm</type>
|
||||||
<boot dev='hd'/>
|
<boot dev='hd'/>
|
||||||
</os>
|
</os>
|
||||||
<clock offset='utc'/>
|
<clock offset='utc'/>
|
||||||
|
@ -41,11 +41,8 @@ static const virArch arch_alias[VIR_ARCH_LAST] = {
|
|||||||
static const char *const i386_machines[] = {
|
static const char *const i386_machines[] = {
|
||||||
"pc", "isapc", NULL
|
"pc", "isapc", NULL
|
||||||
};
|
};
|
||||||
static const char *const x86_64_machines_kvm[] = {
|
static const char *const x86_64_machines[] = {
|
||||||
"pc", "isapc", NULL
|
"pc", "pc-0.11", "pc-0.10", "isapc", NULL
|
||||||
};
|
|
||||||
static const char *const x86_64_machines_qemu[] = {
|
|
||||||
"pc-0.11", "pc", "pc-0.10", "isapc", NULL
|
|
||||||
};
|
};
|
||||||
static const char *const aarch64_machines[] = {
|
static const char *const aarch64_machines[] = {
|
||||||
"virt", NULL
|
"virt", NULL
|
||||||
@ -71,7 +68,7 @@ static const char *const s390x_machines[] = {
|
|||||||
|
|
||||||
static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
||||||
[VIR_ARCH_I686] = i386_machines,
|
[VIR_ARCH_I686] = i386_machines,
|
||||||
[VIR_ARCH_X86_64] = x86_64_machines_qemu,
|
[VIR_ARCH_X86_64] = x86_64_machines,
|
||||||
[VIR_ARCH_AARCH64] = aarch64_machines,
|
[VIR_ARCH_AARCH64] = aarch64_machines,
|
||||||
[VIR_ARCH_ARMV7L] = arm_machines,
|
[VIR_ARCH_ARMV7L] = arm_machines,
|
||||||
[VIR_ARCH_PPC64] = ppc64_machines,
|
[VIR_ARCH_PPC64] = ppc64_machines,
|
||||||
@ -83,7 +80,7 @@ static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
|||||||
|
|
||||||
static const char *const *kvm_machines[VIR_ARCH_LAST] = {
|
static const char *const *kvm_machines[VIR_ARCH_LAST] = {
|
||||||
[VIR_ARCH_I686] = i386_machines,
|
[VIR_ARCH_I686] = i386_machines,
|
||||||
[VIR_ARCH_X86_64] = x86_64_machines_kvm,
|
[VIR_ARCH_X86_64] = x86_64_machines,
|
||||||
[VIR_ARCH_AARCH64] = aarch64_machines,
|
[VIR_ARCH_AARCH64] = aarch64_machines,
|
||||||
[VIR_ARCH_ARMV7L] = arm_machines,
|
[VIR_ARCH_ARMV7L] = arm_machines,
|
||||||
[VIR_ARCH_PPC64] = ppc64_machines,
|
[VIR_ARCH_PPC64] = ppc64_machines,
|
||||||
|
@ -161,10 +161,10 @@ test_virCapsDomainDataLookupQEMU(const void *data G_GNUC_UNUSED)
|
|||||||
/* Checking each parameter individually */
|
/* Checking each parameter individually */
|
||||||
CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
CAPSCOMP(-1, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
||||||
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
|
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
|
||||||
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc-0.11");
|
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc");
|
||||||
CAPSCOMP(VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
CAPSCOMP(VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_NONE, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
||||||
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
|
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,
|
||||||
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc-0.11");
|
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-x86_64", "pc");
|
||||||
CAPSCOMP(-1, VIR_ARCH_AARCH64, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
CAPSCOMP(-1, VIR_ARCH_AARCH64, VIR_DOMAIN_VIRT_NONE, NULL, NULL,
|
||||||
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_AARCH64,
|
VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_AARCH64,
|
||||||
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-aarch64", "virt");
|
VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-aarch64", "virt");
|
||||||
|
Loading…
Reference in New Issue
Block a user