aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/virtio-blk-test.c
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2022-05-04 17:20:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-05-12 12:07:06 +0200
commit02ee7a8a97d3ddeda887b596005b462f680dc89c (patch)
tree1759603930eea8425c9ac9a1618c302b70796926 /tests/qtest/virtio-blk-test.c
parent3df72d1c5500347eac0b5b6d9894713dc443a079 (diff)
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>
Diffstat (limited to 'tests/qtest/virtio-blk-test.c')
-rw-r--r--tests/qtest/virtio-blk-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qtest/virtio-blk-test.c b/tests/qtest/virtio-blk-test.c
index f22594a1a8..dc5eed31c8 100644
--- a/tests/qtest/virtio-blk-test.c
+++ b/tests/qtest/virtio-blk-test.c
@@ -701,6 +701,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, "virtio-blk-pci", "drv1",
"{'addr': %s, 'drive': 'drive1'}",