mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
tests: Clean up wait for event
We still use hacks like qmp("") to wait for an event, even though we have qmp_eventwait() since commit8fe941f
, and qmp_eventwait_ref() since commit7ffe312
. Both commits neglected to convert all the existing hacks. Make up what they missed. Bonus: gets rid of empty format strings. A step towards compile-time format string checking without triggering -Wformat-zero-length. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> [thuth: dropped the hunks from the usb tests - not needed anymore] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
bec9c64ef7
commit
2c58c27bee
4 changed files with 13 additions and 33 deletions
|
@ -173,9 +173,5 @@ void qpci_unplug_acpi_device_test(const char *id, uint8_t slot)
|
|||
|
||||
outb(ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot);
|
||||
|
||||
response = qmp("");
|
||||
g_assert(response);
|
||||
g_assert(qdict_haskey(response, "event"));
|
||||
g_assert(!strcmp(qdict_get_str(response, "event"), "DEVICE_DELETED"));
|
||||
QDECREF(response);
|
||||
qmp_eventwait("DEVICE_DELETED");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue