qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH] libqos/qgraph: format qgraph comments for sphinx documentation
Date: Thu, 25 Feb 2021 09:22:42 +0100	[thread overview]
Message-ID: <6ac6ecf9-ea88-56f5-43c5-645627ff5d9e@redhat.com> (raw)
In-Reply-To: <919d2c24-92f8-53e8-5598-97166add3083@redhat.com>



On 24/02/2021 11:59, Emanuele Giuseppe Esposito wrote:
> 
> 
> On 24/02/2021 11:49, Paolo Bonzini wrote:
>> On 24/02/21 11:18, Emanuele Giuseppe Esposito wrote:
>>>     qtest
>>> +   qgraph
>>
>> It may make sense to add instead a "toctree" directive in qtest.rst.  
>> I haven't checked what the result looks like, though.
> 
> Current result is
> 
> - QTest Device Emulation Testing Framework
> - Qtest Driver Framework
> 
> but I agree, maybe with an internal toctree in qtest.rst it will be 
> clearer. I'll try.

After trying, I think that simply adding a toctree in qtest.rst is not 
the prettiest solution. The end result will be something like

Qtest driver framework (title)
	- qgraph (link to qgraph.rst)
QTest is a device emulation testing framework... [qtest.rst content]

The qgraph link will be also visible in docs/index and docs/devel/index

What about this:

diff --git a/docs/devel/qgraph.rst b/docs/devel/qgraph.rst
index 9349c45af8..62a45cbcbf 100644
--- a/docs/devel/qgraph.rst
+++ b/docs/devel/qgraph.rst
@@ -1,5 +1,261 @@
+.. _qgraph:
+
  ========================================
  Qtest Driver Framework
  ========================================

-------

Add anchor in graph.rst


  .. kernel-doc:: tests/qtest/libqos/qgraph.h
diff --git a/docs/devel/qtest.rst b/docs/devel/qtest.rst
index 97c5a75626..b7201456b6 100644
--- a/docs/devel/qtest.rst
+++ b/docs/devel/qtest.rst
@@ -2,6 +2,12 @@
  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 +30,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:

-------

Add hidden toctree because the new file must be linked by at least one, 
and reference qgraph in the text using the anchor.



diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index 1dcce3bbed..f0038f8722 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -12,6 +12,7 @@ Contents:

  .. toctree::
     :maxdepth: 2
+   :includehidden:

     build-system
     kconfig
@@ -24,7 +25,6 @@ Contents:
     atomics
     stable-process
     qtest
-   qgraph
     decodetree
     secure-coding-practices
     tcg

-------

Allow showing the hidden toctree in the docs/devel index, so that the 
link is visible

End result:
- no visible change in docs/index
- qgraph link visible in docs/devel/index
- qgraph linked as text link in qtree

Thank you,
Emanuele



  reply	other threads:[~2021-02-25  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 10:18 [PATCH] libqos/qgraph: format qgraph comments for sphinx documentation Emanuele Giuseppe Esposito
2021-02-24 10:49 ` Paolo Bonzini
2021-02-24 10:59   ` Emanuele Giuseppe Esposito
2021-02-25  8:22     ` Emanuele Giuseppe Esposito [this message]
2021-02-25 10:05       ` Paolo Bonzini
2021-02-25 10:13         ` Emanuele Giuseppe Esposito

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=6ac6ecf9-ea88-56f5-43c5-645627ff5d9e@redhat.com \
    --to=eesposit@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).