[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP even
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP event data |
Date: |
Mon, 16 Mar 2020 20:48:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Markus Armbruster <address@hidden> writes:
> This policy suppresses deprecated bits in output, and thus permits
> "testing the future". Implement it for QMP event data: suppress
> deprecated members.
>
> No QMP event data is deprecated right now.
>
> Signed-off-by: Markus Armbruster <address@hidden>
Needs a fixup:
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index be5a2433d0..8f77485454 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -167,6 +167,8 @@ static void test_event_deprecated_data(TestEventData *data,
const void *unused)
qapi_event_send_test_event_features0(42);
g_assert(data->emitted);
+ qobject_unref(data->expect);
+
compat_policy.deprecated_output = COMPAT_POLICY_OUTPUT_HIDE;
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST-EVENT-FEATURES0'
}");
qapi_event_send_test_event_features0(42);
diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py
index 78fa60aa8e..f03c825cc1 100644
--- a/scripts/qapi/events.py
+++ b/scripts/qapi/events.py
@@ -125,6 +125,8 @@ def gen_event_send(name, arg_type, features, boxed,
visit_complete(v, &obj);
if (qdict_size(qobject_to(QDict, obj))) {
qdict_put_obj(qmp, "data", obj);
+ } else {
+ qobject_unref(obj);
}
''')
- Re: [PATCH v3 24/34] qapi: Replace qmp_dispatch()'s TODO comment by an explanation, (continued)
- [PATCH v3 32/34] qapi: Implement deprecated-input=reject for QMP commands, Markus Armbruster, 2020/03/15
- [PATCH v3 16/34] qapi/schema: Change _make_features() to a take feature list, Markus Armbruster, 2020/03/15
- [PATCH v3 21/34] qapi: Inline do_qmp_dispatch() into qmp_dispatch(), Markus Armbruster, 2020/03/15
- [PATCH v3 08/34] tests/test-qmp-event: Simplify test data setup, Markus Armbruster, 2020/03/15
- [PATCH v3 04/34] docs/devel/qapi-code-gen: Document 'features' introspection, Markus Armbruster, 2020/03/15
- [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP event data, Markus Armbruster, 2020/03/15
- Re: [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP event data,
Markus Armbruster <=
- [PATCH v3 33/34] qapi: Implement deprecated-input=reject for QMP command arguments, Markus Armbruster, 2020/03/15
- [PATCH v3 07/34] tests/test-qmp-cmds: Simplify test data setup, Markus Armbruster, 2020/03/15
- [PATCH v3 11/34] qapi/schema: Clean up around QAPISchemaEntity.connect_doc(), Markus Armbruster, 2020/03/15
- [PATCH v3 01/34] qemu-doc: Belatedly document QMP command arg & result deprecation, Markus Armbruster, 2020/03/15
- [PATCH v3 17/34] qapi/schema: Reorder classes so related ones are together, Markus Armbruster, 2020/03/15