mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
tests/qtest/libqos: Skip hotplug tests if pci root bus is not hotpluggable
ARM does not not support hotplug on pcie.0. Add a flag on the bus which tells if devices can be hotplugged and skip hotplug tests if the bus cannot be hotplugged. This is a temporary solution to enable the other pci tests on aarch64. Signed-off-by: Eric Auger <eric.auger@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220504152025.1785704-3-eric.auger@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3df72d1c55
commit
02ee7a8a97
6 changed files with 32 additions and 0 deletions
|
@ -676,6 +676,11 @@ static void pci_hotplug(void *obj, void *data, QGuestAllocator *t_alloc)
|
|||
QVirtioPCIDevice *dev;
|
||||
QTestState *qts = dev1->pdev->bus->qts;
|
||||
|
||||
if (dev1->pdev->bus->not_hotpluggable) {
|
||||
g_test_skip("pci bus does not support hotplug");
|
||||
return;
|
||||
}
|
||||
|
||||
/* plug secondary disk */
|
||||
qtest_qmp_device_add(qts, "vhost-user-blk-pci", "drv1",
|
||||
"{'addr': %s, 'chardev': 'char2'}",
|
||||
|
@ -703,6 +708,11 @@ static void multiqueue(void *obj, void *data, QGuestAllocator *t_alloc)
|
|||
uint64_t features;
|
||||
uint16_t num_queues;
|
||||
|
||||
if (pdev1->pdev->bus->not_hotpluggable) {
|
||||
g_test_skip("bus pci.0 does not support hotplug");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The primary device has 1 queue and VIRTIO_BLK_F_MQ is not enabled. The
|
||||
* VIRTIO specification allows VIRTIO_BLK_F_MQ to be enabled when there is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue