aboutsummaryrefslogtreecommitdiff
path: root/tests/test-qmp-event.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2018-08-15 21:37:37 +0800
committerMarkus Armbruster <armbru@redhat.com>2018-08-28 18:21:38 +0200
commit3ab72385b21d8d66df3f5fea42097ce264dc9d6b (patch)
tree47e25323bfe6a14e3cd5bdf66cdc6b94dbfa9533 /tests/test-qmp-event.c
parentbdd2d42b890b3a908fa3fbdc9661541e1b57eb15 (diff)
qapi: Drop qapi_event_send_FOO()'s Error ** argument
The generated qapi_event_send_FOO() take an Error ** argument. They can't actually fail, because all they do with the argument is passing it to functions that can't fail: the QObject output visitor, and the @qmp_emit callback, which is either monitor_qapi_event_queue() or event_test_emit(). Drop the argument, and pass &error_abort to the QObject output visitor and @qmp_emit instead. Suggested-by: Eric Blake <eblake@redhat.com> Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180815133747.25032-4-peterx@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message rewritten, update to qapi-code-gen.txt corrected] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/test-qmp-event.c')
-rw-r--r--tests/test-qmp-event.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index 8677094ad1..9cddd72adb 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -95,7 +95,7 @@ static bool qdict_cmp_simple(QDict *a, QDict *b)
/* This function is hooked as final emit function, which can verify the
correctness. */
-static void event_test_emit(test_QAPIEvent event, QDict *d, Error **errp)
+static void event_test_emit(test_QAPIEvent event, QDict *d)
{
QDict *t;
int64_t s, ms;
@@ -156,7 +156,7 @@ static void test_event_a(TestEventData *data,
QDict *d;
d = data->expect;
qdict_put_str(d, "event", "EVENT_A");
- qapi_event_send_event_a(&error_abort);
+ qapi_event_send_event_a();
}
static void test_event_b(TestEventData *data,
@@ -165,7 +165,7 @@ static void test_event_b(TestEventData *data,
QDict *d;
d = data->expect;
qdict_put_str(d, "event", "EVENT_B");
- qapi_event_send_event_b(&error_abort);
+ qapi_event_send_event_b();
}
static void test_event_c(TestEventData *data,
@@ -191,7 +191,7 @@ static void test_event_c(TestEventData *data,
qdict_put_str(d, "event", "EVENT_C");
qdict_put(d, "data", d_data);
- qapi_event_send_event_c(true, 1, true, &b, "test2", &error_abort);
+ qapi_event_send_event_c(true, 1, true, &b, "test2");
g_free(b.string);
}
@@ -233,8 +233,7 @@ static void test_event_d(TestEventData *data,
qdict_put_str(d, "event", "EVENT_D");
qdict_put(d, "data", d_data);
- qapi_event_send_event_d(&a, "test3", false, NULL, true, ENUM_ONE_VALUE3,
- &error_abort);
+ qapi_event_send_event_d(&a, "test3", false, NULL, true, ENUM_ONE_VALUE3);
g_free(struct1.string);
g_free(a.string);