libqos/qgraph: format qgraph comments for sphinx documentation
PATCH v2 1/1 libqos/qgraph: format qgraph comments for sphinx documentation
Change documentation style and fix minor typos in tests/qtest/libqos/qgraph.h to automatically generate sphinx documentation in docs/devel/qgraph.rst
The mechanism explanation that once was in qgraph.h is now moved to qgraph.rst
There is no functional change intended.
v2:
- qgraph link visible in docs/devel/index but not in docs/index, since it is a subsection of qtest.
--- MAINTAINERS | 1 + docs/devel/index.rst | 1 + docs/devel/qgraph.rst | 261 ++++++++++++++++++++++++++++++ docs/devel/qtest.rst | 8 + tests/qtest/libqos/qgraph.h | 308 ++++++------------------------------ 5 files changed, 320 insertions(+), 259 deletions(-) create mode 100644 docs/devel/qgraph.rst
MAINTAINERS +1 -0
@@ -2592,6 +2592,7 @@ S: Maintained F: softmmu/qtest.c F: accel/qtest/ F: tests/qtest/ +F: docs/devel/qgraph.rst X: tests/qtest/bios-tables-test* Device Fuzzing
docs/devel/index.rst +1 -0
@@ -12,6 +12,7 @@ Contents: .. toctree:: :maxdepth: 2 + :includehidden: build-system kconfig
docs/devel/qgraph.rst new file +261 -0
261 lines not on this page · raw message
docs/devel/qtest.rst +8 -0
@@ -2,6 +2,11 @@ QTest Device Emulation Testing Framework ======================================== +.. toctree:: + :hidden: + + qgraph + QTest is a device emulation testing framework. It can be very useful to test device models; it could also control certain aspects of QEMU (such as virtual clock stepping), with a special purpose "qtest" protocol. Refer to
@@ -24,6 +29,9 @@ On top of libqtest, a higher level library, ``libqos``, was created to encapsulate common tasks of device drivers, such as memory management and communicating with system buses or devices. Many virtual device tests use libqos instead of directly calling into libqtest. +Libqos also offers the Qgraph API to increase each test coverage and +automate QEMU command line arguments and devices setup. +Refer to :ref:`qgraph` for Qgraph explanation and API. Steps to add a new QTest case are:
tests/qtest/libqos/qgraph.h +49 -259
428 lines not on this page · raw message
Signature · 1 line
2.29.2
Quoted 12 lines · Emanuele Giuseppe Esposito
Change documentation style and fix minor typos in
tests/qtest/libqos/qgraph.hto automatically generate sphinx documentation indocs/devel/qgraph.rstThe mechanism explanation that once was in
qgraph.his now moved toqgraph.rstThere is no functional change intended.
v2:
- qgraph link visible in docs/devel/index but not in docs/index, since it is a subsection of qtest.Signed-off-by Emanuele Giuseppe Esposito <[email protected]>
Quoted 8 lines
--- MAINTAINERS | 1 + docs/devel/index.rst | 1 + docs/devel/qgraph.rst | 261 ++++++++++++++++++++++++++++++ docs/devel/qtest.rst | 8 + tests/qtest/libqos/qgraph.h | 308 ++++++------------------------------ 5 files changed, 320 insertions(+), 259 deletions(-)create mode 100644
docs/devel/qgraph.rst
I'm getting a bunch of warnings after applying this patch:
../tests/qtest/libqos/qgraph.h:53: warning: cannot understand function prototype: 'struct QOSGraphEdgeOptions ' ../tests/qtest/libqos/qgraph.h:93: warning: cannot understand function prototype: 'struct QOSGraphTestOptions ' ../tests/qtest/libqos/qgraph.h:138: warning: cannot understand function prototype: 'struct QOSGraphObject ' ../tests/qtest/libqos/qgraph.h:218: warning: Function parameter or member 'opts' not described in 'qos_node_create_machine_args' ../tests/qtest/libqos/qgraph.h:218: warning: Excess function parameter 'pts' description in 'qos_node_create_machine_args'
Any chance to fix them first?
Thomas
Quoted 23 lines · Thomas Huth
Quoted 13 lines · Emanuele Giuseppe Esposito
Change documentation style and fix minor typos in
tests/qtest/libqos/qgraph.hto automatically generate sphinx documentation indocs/devel/qgraph.rstThe mechanism explanation that once was in
qgraph.his now moved toqgraph.rstThere is no functional change intended.
v2:
- qgraph link visible in docs/devel/index but not in docs/index, since it is
a subsection of qtest.Signed-off-by Emanuele Giuseppe Esposito <[email protected]>Quoted 8 lines
---
MAINTAINERS | 1 +
docs/devel/index.rst | 1 +
docs/devel/qgraph.rst | 261 ++++++++++++++++++++++++++++++ docs/devel/qtest.rst | 8 +tests/qtest/libqos/qgraph.h| 308 ++++++------------------------------5 files changed, 320 insertions(+), 259 deletions(-)create mode 100644
docs/devel/qgraph.rst
Quoted 1 line
I'm getting a bunch of warnings after applying this patch:
Apparently this does not appear with "make sphixdocs", only when doing a full build.
Quoted 8 lines
../tests/qtest/libqos/qgraph.h:53: warning: cannot understand function prototype: 'struct QOSGraphEdgeOptions '../tests/qtest/libqos/qgraph.h:93: warning: cannot understand function prototype: 'struct QOSGraphTestOptions '../tests/qtest/libqos/qgraph.h:138: warning: cannot understand function prototype: 'struct QOSGraphObject../tests/qtest/libqos/qgraph.h:218: warning: Function parameter or member 'opts' not described in 'qos_node_create_machine_args'../tests/qtest/libqos/qgraph.h:218: warning: Excess function parameter 'pts' description in 'qos_node_create_machine_argsAny chance to fix them first?
Thank you for spotting this. Will fix in v3.
Thank you,
Emanuele