mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
tests: qpci_unplug_acpi_device_test() should not rely on global_qtest
libqos functions should not use functions that require global_qtest to be set, since such library functions could also be used by tests that deal with multiple test states. Add a parameter to this function to explicitly specify the test state. Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190508143209.24350-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
a771729cdf
commit
6ebb8d2a21
7 changed files with 24 additions and 13 deletions
|
@ -679,6 +679,7 @@ static void pci_hotplug(void *obj, void *data, QGuestAllocator *t_alloc)
|
|||
{
|
||||
QVirtioPCIDevice *dev1 = obj;
|
||||
QVirtioPCIDevice *dev;
|
||||
QTestState *qts = dev1->pdev->bus->qts;
|
||||
|
||||
/* plug secondary disk */
|
||||
qtest_qmp_device_add("virtio-blk-pci", "drv1",
|
||||
|
@ -693,7 +694,7 @@ static void pci_hotplug(void *obj, void *data, QGuestAllocator *t_alloc)
|
|||
qos_object_destroy((QOSGraphObject *)dev);
|
||||
|
||||
/* unplug secondary disk */
|
||||
qpci_unplug_acpi_device_test("drv1", PCI_SLOT_HP);
|
||||
qpci_unplug_acpi_device_test(qts, "drv1", PCI_SLOT_HP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue