tests/qapi-schema: Tweak to demonstrate buggy member name check
commit73c40b07c6fffcb2725f4c9d3f361967e39aef97
authorMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 09:40:03 +0000 (23 10:40 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 23 Mar 2021 21:29:19 +0000 (23 22:29 +0100)
tree020e488a0289b526abf55cd66526fe341c22e290
parent1444989a3a4e8399e366ceecf4ed5bbd2d83c727
tests/qapi-schema: Tweak to demonstrate buggy member name check

Member name 'u' and names starting with 'has-' or 'has_' are reserved
for the generator.  check_type() enforces this, covered by tests
reserved-member-u and reserved-member-has.

These tests neglect to cover optional members, where the name starts
with '*'.  Tweak reserved-member-u to fix that.  Test
reserved-member-has still covers non-optional members.

This demonstrates the reserved member name check is broken for
optional members.  The next commit will fix it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-7-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
[Commit message improved slightly]
tests/qapi-schema/reserved-member-u.err
tests/qapi-schema/reserved-member-u.json
tests/qapi-schema/reserved-member-u.out