mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
qapi: Drop redundant returns-int test
qapi-schema-test was already testing that we could have a command returning int, but burned a command name in the whitelist. Merge the redundant positive test returns-int, and pick a name that reduces the whitelist size. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1444710158-8723-6-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
625b251c69
commit
cae95eae62
9 changed files with 10 additions and 20 deletions
|
|
@ -46,7 +46,7 @@ UserDefTwo *qmp_user_def_cmd2(UserDefOne *ud1a,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int64_t qmp_user_def_cmd3(int64_t a, bool has_b, int64_t b, Error **errp)
|
||||
int64_t qmp_guest_get_time(int64_t a, bool has_b, int64_t b, Error **errp)
|
||||
{
|
||||
return a + (has_b ? b : 0);
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ static void test_dispatch_cmd_io(void)
|
|||
|
||||
qdict_put(args3, "a", qint_from_int(66));
|
||||
qdict_put(req, "arguments", args3);
|
||||
qdict_put(req, "execute", qstring_from_str("user_def_cmd3"));
|
||||
qdict_put(req, "execute", qstring_from_str("guest-get-time"));
|
||||
|
||||
ret3 = qobject_to_qint(test_qmp_dispatch(req));
|
||||
assert(qint_get_int(ret3) == 66);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue