diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-03-23 10:40:21 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-03-23 22:31:05 +0100 |
commit | 05ebf841efac494d8bd1f6d74642c3e9a3df4c19 (patch) | |
tree | bf8c88a6f5c35c54af8b5ff582c0b94de28fb95c /tests/unit | |
parent | e744708a7783624292f8c405ca840f50a10b0003 (diff) |
qapi: Enforce command naming rules
Command names should be lower-case. Enforce this. Fix the fixable
offenders (all in tests/), and add the remainder to pragma
command-name-exceptions.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-25-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test-qmp-cmds.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/test-qmp-cmds.c b/tests/unit/test-qmp-cmds.c index 99973dde7c..1b0b7d99df 100644 --- a/tests/unit/test-qmp-cmds.c +++ b/tests/unit/test-qmp-cmds.c @@ -13,7 +13,7 @@ static QmpCommandList qmp_commands; -UserDefThree *qmp_TestCmdReturnDefThree(Error **errp) +UserDefThree *qmp_test_cmd_return_def_three(Error **errp) { return NULL; } @@ -199,7 +199,7 @@ static void test_dispatch_cmd(void) ret = qobject_to(QDict, do_qmp_dispatch(false, - "{ 'execute': 'user_def_cmd' }")); + "{ 'execute': 'user-def-cmd' }")); assert(ret && qdict_size(ret) == 0); qobject_unref(ret); } @@ -220,11 +220,11 @@ static void test_dispatch_cmd_failure(void) { /* missing arguments */ do_qmp_dispatch_error(false, ERROR_CLASS_GENERIC_ERROR, - "{ 'execute': 'user_def_cmd2' }"); + "{ 'execute': 'user-def-cmd2' }"); /* extra arguments */ do_qmp_dispatch_error(false, ERROR_CLASS_GENERIC_ERROR, - "{ 'execute': 'user_def_cmd'," + "{ 'execute': 'user-def-cmd'," " 'arguments': { 'a': 66 } }"); } @@ -248,7 +248,7 @@ static void test_dispatch_cmd_io(void) int64_t val; ret = qobject_to(QDict, do_qmp_dispatch(false, - "{ 'execute': 'user_def_cmd2', 'arguments': {" + "{ 'execute': 'user-def-cmd2', 'arguments': {" " 'ud1a': { 'integer': 42, 'string': 'hello' }," " 'ud1b': { 'integer': 422, 'string': 'hello2' } } }")); |