aboutsummaryrefslogtreecommitdiff
path: root/tests/test-qmp-commands.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-05-15 17:51:20 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-05-15 17:51:20 +0100
commit385057cbec9b4a0eb6150330c572e875ed714965 (patch)
tree7adc24566bfe8afc56aee25128b2fc3bd5a6a9a5 /tests/test-qmp-commands.c
parent99e7627a70d1a23e30a514e5a4798005cf4eb3aa (diff)
parent4180978c9205c50acd2d6c385def9b3e81911696 (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-05-15' into staging
qapi: Fix qapi mangling of downstream names, and more # gpg: Signature made Fri May 15 17:41:31 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-qapi-2015-05-15: (26 commits) qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue() qapi: Drop pointless flush() before close() qapi: Factor open_output(), close_output() out of generators qapi: Turn generators' mandatory option -i into an argument qapi: Fix generators to report command line errors decently qapi: Factor parse_command_line() out of the generators qapi: qapi-commands.py option --type is unused, drop it qapi: qapi-event.py option -b does nothing, drop it tests: Add missing dependencies on $(qapi-py) qapi: Support downstream events and commands qapi: Support downstream alternates qapi: Support downstream flat unions qapi: Support downstream simple unions qapi: Support downstream structs qapi: Support downstream enums qapi: Make c_type() consistently convert qapi names qapi: Tidy c_type() logic qapi: Move camel_to_upper(), c_enum_const() to closely related code qapi: Use c_enum_const() in generate_alternate_qtypes() qapi: Simplify c_enum_const() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/test-qmp-commands.c')
-rw-r--r--tests/test-qmp-commands.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
index ad2e4030b2..9918f23062 100644
--- a/tests/test-qmp-commands.c
+++ b/tests/test-qmp-commands.c
@@ -51,6 +51,21 @@ int64_t qmp_user_def_cmd3(int64_t a, bool has_b, int64_t b, Error **errp)
return a + (has_b ? b : 0);
}
+__org_qemu_x_Union1 *qmp___org_qemu_x_command(__org_qemu_x_EnumList *a,
+ __org_qemu_x_StructList *b,
+ __org_qemu_x_Union2 *c,
+ __org_qemu_x_Alt *d,
+ Error **errp)
+{
+ __org_qemu_x_Union1 *ret = g_new0(__org_qemu_x_Union1, 1);
+
+ ret->kind = ORG_QEMU_X_UNION1_KIND___ORG_QEMU_X_BRANCH;
+ ret->__org_qemu_x_branch = strdup("blah1");
+
+ return ret;
+}
+
+
/* test commands with no input and no return value */
static void test_dispatch_cmd(void)
{