diff options
| author | Markus Armbruster | 2017-09-11 19:19:48 +0200 |
|---|---|---|
| committer | Thomas Huth | 2018-02-14 10:08:40 +0100 |
| commit | 2c58c27beeba1a5be4bceeb283cbc90d4233a090 (patch) | |
| tree | 812da89e85c44a2967e2112b1f2a51fe3151fe92 /tests/tco-test.c | |
| parent | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff) | |
| download | qemu-2c58c27beeba1a5be4bceeb283cbc90d4233a090.tar.gz qemu-2c58c27beeba1a5be4bceeb283cbc90d4233a090.tar.xz qemu-2c58c27beeba1a5be4bceeb283cbc90d4233a090.zip | |
tests: Clean up wait for event
We still use hacks like qmp("") to wait for an event, even though we
have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref()
since commit 7ffe312. 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>
Diffstat (limited to 'tests/tco-test.c')
| -rw-r--r-- | tests/tco-test.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/tco-test.c b/tests/tco-test.c index 8ab43d742a..cc7663dd8e 100644 --- a/tests/tco-test.c +++ b/tests/tco-test.c @@ -237,9 +237,8 @@ static void test_tco_max_timeout(void) static QDict *get_watchdog_action(void) { - QDict *ev = qmp(""); + QDict *ev = qmp_eventwait_ref("WATCHDOG"); QDict *data; - g_assert(!strcmp(qdict_get_str(ev, "event"), "WATCHDOG")); data = qdict_get_qdict(ev, "data"); QINCREF(data); |
