diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-03-23 10:40:19 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-03-23 22:31:05 +0100 |
commit | 9af4b6b9e80daeab2ce47664ff422b5e421814de (patch) | |
tree | 79a697437e154779da2008eac0299bf90e5d32e5 /tests | |
parent | 6e2e12a70c0b7f7fe71a7938b9c49bdaa608ce58 (diff) | |
download | qemu-9af4b6b9e80daeab2ce47664ff422b5e421814de.zip qemu-9af4b6b9e80daeab2ce47664ff422b5e421814de.tar.gz qemu-9af4b6b9e80daeab2ce47664ff422b5e421814de.tar.bz2 |
qapi: Prepare for rejecting underscore in command and member names
Command names and member names within a type should be all lower case
with words separated by a hyphen. We also accept underscore. Rework
check_name_lower() to optionally reject underscores, but don't use
that option, yet.
Update expected test output for the changed error message.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-23-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qapi-schema/args-member-case.err | 2 | ||||
-rw-r--r-- | tests/qapi-schema/enum-member-case.err | 2 | ||||
-rw-r--r-- | tests/qapi-schema/union-branch-case.err | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/qapi-schema/args-member-case.err b/tests/qapi-schema/args-member-case.err index 4f33dbb..25c3910 100644 --- a/tests/qapi-schema/args-member-case.err +++ b/tests/qapi-schema/args-member-case.err @@ -1,2 +1,2 @@ args-member-case.json: In command 'no-way-this-will-get-whitelisted': -args-member-case.json:2: 'data' member 'Arg' uses uppercase in name +args-member-case.json:2: name of 'data' member 'Arg' must not use uppercase or '_' diff --git a/tests/qapi-schema/enum-member-case.err b/tests/qapi-schema/enum-member-case.err index 8b3aefe..c813522 100644 --- a/tests/qapi-schema/enum-member-case.err +++ b/tests/qapi-schema/enum-member-case.err @@ -1,2 +1,2 @@ enum-member-case.json: In enum 'NoWayThisWillGetWhitelisted': -enum-member-case.json:4: 'data' member 'Value' uses uppercase in name +enum-member-case.json:4: name of 'data' member 'Value' must not use uppercase or '_' diff --git a/tests/qapi-schema/union-branch-case.err b/tests/qapi-schema/union-branch-case.err index b1e9417..d2d5cb8 100644 --- a/tests/qapi-schema/union-branch-case.err +++ b/tests/qapi-schema/union-branch-case.err @@ -1,2 +1,2 @@ union-branch-case.json: In union 'Uni': -union-branch-case.json:2: 'data' member 'Branch' uses uppercase in name +union-branch-case.json:2: name of 'data' member 'Branch' must not use uppercase or '_' |