Marc-André Lureau <marcandre.lur...@redhat.com> writes: > These 2 tests exhibit two qmp bugs fixed by the previous patches.
No objections to having QMP tests, but the ones fixed by PATCH 2 are QMP input visitor bugs, which sneaked through the existing test-qmp-input-visitor.c. Makes me suspect we should close the test coverage hole there. The appended patch narrowly exercises one of the two bugs. No good, we should test all the visit_type_FOO() rather than just visit_type_any(). I can do that, breaks the tedium of patch review :) [...] diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index f583dce..11f55ac 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -237,6 +237,7 @@ static void test_visitor_in_any(TestInputVisitorData *data, const void *unused) { QObject *res = NULL; + Error *err = NULL; Visitor *v; QInt *qint; QBool *qbool; @@ -271,6 +272,12 @@ static void test_visitor_in_any(TestInputVisitorData *data, g_assert(qstring); g_assert_cmpstr(qstring_get_str(qstring), ==, "foo"); qobject_decref(res); + + v = visitor_input_test_init(data, "{}"); + visit_start_struct(v, NULL, NULL, 0, &error_abort); + visit_type_any(v, "any", &res, &err); + error_free_or_abort(&err); + visit_end_struct(v, NULL); } static void test_visitor_in_null(TestInputVisitorData *data,