Message ID | 20170911110623.24981-44-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
Series | Hi, | expand |
Marc-André Lureau <marcandre.lureau@redhat.com> writes: > The following patches are going to introduce per-target #ifdef, and > but the introspection data is generated only once, and must thus be > built with the target. "and but"? > Drop "do_test_visitor_in_qmp_introspect(&&qmp_schema_qlit)" since it s/&&/&/ > is no longer in a common object, and covered by "query-qmp-schema > test" instead. Do you mean test /x86_64/qmp/query-qmp-schema of tests/qmp-test.c? That test tests significantly less. It runs the command, tests it succeeds and returns something. The test you remove additionally tests the returned value conforms to the schema, by passing it to visit_type_SchemaInfoList(). Perhaps we can enhance the test you keep to avoid this loss. > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Hi On Thu, Dec 14, 2017 at 5:30 PM, Markus Armbruster <armbru@redhat.com> wrote: > Marc-André Lureau <marcandre.lureau@redhat.com> writes: > >> The following patches are going to introduce per-target #ifdef, and >> but the introspection data is generated only once, and must thus be >> built with the target. > > "and but"? > >> Drop "do_test_visitor_in_qmp_introspect(&&qmp_schema_qlit)" since it > > s/&&/&/ > >> is no longer in a common object, and covered by "query-qmp-schema >> test" instead. > > Do you mean test /x86_64/qmp/query-qmp-schema of tests/qmp-test.c? > I updated the commit message. > That test tests significantly less. It runs the command, tests it > succeeds and returns something. The test you remove additionally tests > the returned value conforms to the schema, by passing it to > visit_type_SchemaInfoList(). > > Perhaps we can enhance the test you keep to avoid this loss. > It does call visit_type_SchemaInfoList() already on the return value. thanks
diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c index 7c1d10e274..ad4c99a4c7 100644 --- a/tests/test-qobject-input-visitor.c +++ b/tests/test-qobject-input-visitor.c @@ -1267,7 +1267,6 @@ static void test_visitor_in_qmp_introspect(TestInputVisitorData *data, const void *unused) { do_test_visitor_in_qmp_introspect(data, &test_qmp_schema_qlit); - do_test_visitor_in_qmp_introspect(data, &qmp_schema_qlit); } int main(int argc, char **argv) diff --git a/Makefile.objs b/Makefile.objs index 24a4ea08b8..f8ba6228ca 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -2,7 +2,7 @@ # Common libraries for tools and emulators stub-obj-y = stubs/ crypto/ util-obj-y = util/ qobject/ qapi/ -util-obj-y += qmp-introspect.o qapi-types.o qapi-visit.o qapi-event.o +util-obj-y += qapi-types.o qapi-visit.o qapi-event.o chardev-obj-y = chardev/ @@ -77,7 +77,6 @@ common-obj-$(CONFIG_FDT) += device_tree.o # qapi common-obj-y += qmp-marshal.o -common-obj-y += qmp-introspect.o common-obj-y += qmp.o hmp.o endif diff --git a/Makefile.target b/Makefile.target index 7f42c45db8..0d28ed1df0 100644 --- a/Makefile.target +++ b/Makefile.target @@ -157,6 +157,8 @@ endif GENERATED_FILES += hmp-commands.h hmp-commands-info.h +obj-y += qmp-introspect.o + endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure.
The following patches are going to introduce per-target #ifdef, and but the introspection data is generated only once, and must thus be built with the target. Drop "do_test_visitor_in_qmp_introspect(&&qmp_schema_qlit)" since it is no longer in a common object, and covered by "query-qmp-schema test" instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- tests/test-qobject-input-visitor.c | 1 - Makefile.objs | 3 +-- Makefile.target | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-)