mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
tests: Fix aliases for pSeries buses
virQEMUCapsHasPCIMultiBus() performs a version check on the QEMU binary to figure out whether multiple buses are supported, so to get the correct aliases assigned when dealing with pSeries guests we need to spoof the version accordingly in the test suite.
This commit is contained in:
parent
5b78337992
commit
3a37af1e41
@ -2341,6 +2341,14 @@ virArch virQEMUCapsGetArch(virQEMUCapsPtr qemuCaps)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps,
|
||||
unsigned int version)
|
||||
{
|
||||
qemuCaps->version = version;
|
||||
}
|
||||
|
||||
|
||||
unsigned int virQEMUCapsGetVersion(virQEMUCapsPtr qemuCaps)
|
||||
{
|
||||
return qemuCaps->version;
|
||||
|
@ -69,6 +69,10 @@ void
|
||||
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
|
||||
virArch arch);
|
||||
|
||||
void
|
||||
virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps,
|
||||
unsigned int version);
|
||||
|
||||
void
|
||||
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
virCapsPtr caps);
|
||||
|
@ -25,4 +25,4 @@ QEMU_AUDIO_DRV=none \
|
||||
-append 'root=/dev/ram rw console=ttyS0,115200' \
|
||||
-usb \
|
||||
-serial pty \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci,addr=0x2
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
|
||||
|
@ -22,4 +22,4 @@ QEMU_AUDIO_DRV=none \
|
||||
-dtb /media/ram/test.dtb \
|
||||
-usb \
|
||||
-serial pty \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci,addr=0x2
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
|
||||
|
@ -16,4 +16,4 @@ QEMU_AUDIO_DRV=none \
|
||||
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||
-boot c \
|
||||
-usb \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci,addr=0x6
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
|
||||
|
@ -15,5 +15,5 @@ QEMU_AUDIO_DRV=none \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||
-boot c \
|
||||
-device pci-ohci,id=usb,bus=pci,addr=0x1 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci,addr=0x6
|
||||
-device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
|
||||
|
@ -23,4 +23,4 @@ server,nowait \
|
||||
-append 'root=/dev/ram rw console=ttyS0,115200' \
|
||||
-usb \
|
||||
-serial pty \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci,addr=0x2
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
|
||||
|
@ -19,6 +19,6 @@ server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device pci-ohci,id=usb,bus=pci,addr=0x1 \
|
||||
-device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device spapr-vty,chardev=charserial0,reg=0x30000000
|
||||
|
@ -19,7 +19,7 @@ server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device pci-ohci,id=usb,bus=pci,addr=0x1 \
|
||||
-device pci-ohci,id=usb,bus=pci.0,addr=0x1 \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device spapr-vty,chardev=charserial0,reg=0x30000000 \
|
||||
-device usb-kbd,id=input0,bus=usb.0,port=1
|
||||
|
@ -19,7 +19,7 @@ server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device piix3-usb-uhci,id=usb,bus=pci,addr=0x1 \
|
||||
-device pci-ohci,id=usb1,bus=pci,addr=0x2 \
|
||||
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1 \
|
||||
-device pci-ohci,id=usb1,bus=pci.0,addr=0x2 \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device spapr-vty,chardev=charserial0,reg=0x30000000
|
||||
|
@ -381,6 +381,11 @@ testUpdateQEMUCaps(const struct testInfo *info,
|
||||
|
||||
virQEMUCapsSetArch(info->qemuCaps, vm->def->os.arch);
|
||||
|
||||
/* We need to pretend QEMU 2.0.0 is in use so that pSeries guests
|
||||
* will get the correct alias assigned to their buses.
|
||||
* See virQEMUCapsHasPCIMultiBus() */
|
||||
virQEMUCapsSetVersion(info->qemuCaps, 2000000);
|
||||
|
||||
if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user