summaryrefslogtreecommitdiffstats
path: root/tests/qtest/libqos
diff options
context:
space:
mode:
authorMichael Labiuk2022-09-30 00:35:39 +0200
committerThomas Huth2022-10-11 14:06:48 +0200
commitea42a6c405269229d0923719854637425be07b31 (patch)
treed66e522890e732d53375aee299b1411260ce88c3 /tests/qtest/libqos
parenttests/migration: remove the unused local variable (diff)
downloadqemu-ea42a6c405269229d0923719854637425be07b31.tar.gz
qemu-ea42a6c405269229d0923719854637425be07b31.tar.xz
qemu-ea42a6c405269229d0923719854637425be07b31.zip
tests/x86: add helper qtest_qmp_device_del_send()
Move sending 'device_del' command to separate function. Function can be used in case of addition action is needed to start actual removing device after sending command. Signed-off-by: Michael Labiuk <michael.labiuk@virtuozzo.com> Message-Id: <20220929223547.1429580-2-michael.labiuk@virtuozzo.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fixed typo] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqos')
-rw-r--r--tests/qtest/libqos/pci-pc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/qtest/libqos/pci-pc.c b/tests/qtest/libqos/pci-pc.c
index 81c2c055ca..96046287ac 100644
--- a/tests/qtest/libqos/pci-pc.c
+++ b/tests/qtest/libqos/pci-pc.c
@@ -179,13 +179,7 @@ void qpci_free_pc(QPCIBus *bus)
void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot)
{
- QDict *response;
-
- response = qtest_qmp(qts, "{'execute': 'device_del',"
- " 'arguments': {'id': %s}}", id);
- g_assert(response);
- g_assert(!qdict_haskey(response, "error"));
- qobject_unref(response);
+ qtest_qmp_device_del_send(qts, id);
qtest_outl(qts, ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot);