From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 11/12] tests/qapi-schema: Cover feature documentation comments
Date: Tue, 22 Oct 2019 09:56:14 +0200 [thread overview]
Message-ID: <20191022075615.956-12-armbru@redhat.com> (raw)
In-Reply-To: <20191022075615.956-1-armbru@redhat.com>
Commit 8aa3a33e44 "tests/qapi-schema: Test for good feature lists in
structs" neglected to cover documentation comments, and the previous
commit followed its example. Make up for them.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191018081454.21369-5-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
tests/qapi-schema/doc-good.texi | 22 ++++++++++++++++++++++
tests/qapi-schema/doc-good.json | 17 +++++++++++++++--
tests/qapi-schema/doc-good.out | 5 +++++
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.texi
index 2526abc6d9..2ce8b883c9 100644
--- a/tests/qapi-schema/doc-good.texi
+++ b/tests/qapi-schema/doc-good.texi
@@ -122,6 +122,12 @@ Not documented
@*@b{If:} @code{defined(IFSTR)}
@end table
+@b{Features:}
+@table @asis
+@item @code{variant1-feat}
+a feature
+@end table
+
@end deftp
@@ -182,6 +188,14 @@ argument
Not documented
@end table
+@b{Features:}
+@table @asis
+@item @code{cmd-feat1}
+a feature
+@item @code{cmd-feat2}
+another feature
+@end table
+
@b{Note:}
@code{arg3} is undocumented
@@ -227,6 +241,14 @@ If you're bored enough to read this, go see a video of boxed cats
@b{Arguments:} the members of @code{Object}
+@b{Features:}
+@table @asis
+@item @code{cmd-feat1}
+a feature
+@item @code{cmd-feat2}
+another feature
+@end table
+
@b{Example:}
@example
-> in
diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
index f7fb48af38..7dc21e58a3 100644
--- a/tests/qapi-schema/doc-good.json
+++ b/tests/qapi-schema/doc-good.json
@@ -71,8 +71,12 @@
# A paragraph
#
# Another paragraph (but no @var: line)
+#
+# Features:
+# @variant1-feat: a feature
##
{ 'struct': 'Variant1',
+ 'features': [ 'variant1-feat' ],
'data': { 'var1': { 'type': 'str', 'if': 'defined(IFSTR)' } } }
##
@@ -104,6 +108,10 @@
#
# @arg2: the second
# argument
+#
+# Features:
+# @cmd-feat1: a feature
+# @cmd-feat2: another feature
# Note: @arg3 is undocumented
# Returns: @Object
# TODO: frobnicate
@@ -123,11 +131,15 @@
##
{ 'command': 'cmd',
'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
- 'returns': 'Object' }
+ 'returns': 'Object',
+ 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
##
# @cmd-boxed:
# If you're bored enough to read this, go see a video of boxed cats
+# Features:
+# @cmd-feat1: a feature
+# @cmd-feat2: another feature
# Example:
#
# -> in
@@ -135,4 +147,5 @@
# <- out
##
{ 'command': 'cmd-boxed', 'boxed': true,
- 'data': 'Object' }
+ 'data': 'Object',
+ 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
index 6562e1f412..f78fdef6a9 100644
--- a/tests/qapi-schema/doc-good.out
+++ b/tests/qapi-schema/doc-good.out
@@ -20,6 +20,7 @@ object Base
object Variant1
member var1: str optional=False
if ['defined(IFSTR)']
+ feature variant1-feat
object Variant2
object Object
base Base
@@ -47,8 +48,12 @@ object q_obj_cmd-arg
member arg3: bool optional=False
command cmd q_obj_cmd-arg -> Object
gen=True success_response=True boxed=False oob=False preconfig=False
+ feature cmd-feat1
+ feature cmd-feat2
command cmd-boxed Object -> None
gen=True success_response=True boxed=True oob=False preconfig=False
+ feature cmd-feat1
+ feature cmd-feat2
doc freeform
body=
= Section
--
2.21.0
next prev parent reply other threads:[~2019-10-22 8:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 7:56 [PULL 00/12] QAPI patches for 2019-10-22 Markus Armbruster
2019-10-22 7:56 ` [PULL 01/12] qapi: Don't suppress doc generation without pragma doc-required Markus Armbruster
2019-10-22 7:56 ` [PULL 02/12] qapi: Store pragma state in QAPISourceInfo, not global state Markus Armbruster
2019-10-22 7:56 ` [PULL 03/12] qapi: Eliminate accidental global frontend state Markus Armbruster
2019-10-22 7:56 ` [PULL 04/12] qapi: Speed up frontend tests Markus Armbruster
2019-10-22 7:56 ` [PULL 05/12] qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py Markus Armbruster
2019-10-22 7:56 ` [PULL 06/12] qapi: Split up scripts/qapi/common.py Markus Armbruster
2019-10-22 7:56 ` [PULL 07/12] qapi: Clear scripts/qapi/doc.py executable bits again Markus Armbruster
2019-10-22 7:56 ` [PULL 08/12] tests/qapi-schema: Tidy up test output indentation Markus Armbruster
2019-10-22 7:56 ` [PULL 09/12] qapi: Add feature flags to commands Markus Armbruster
2019-10-22 7:56 ` [PULL 10/12] tests: qapi: Test 'features' of commands Markus Armbruster
2019-10-22 7:56 ` Markus Armbruster [this message]
2019-10-22 7:56 ` [PULL 12/12] qapi: Allow introspecting fix for savevm's cooperation with blockdev Markus Armbruster
2019-10-22 9:32 ` [PULL 00/12] QAPI patches for 2019-10-22 Peter Maydell
2019-10-22 10:49 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191022075615.956-12-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.