qemu/tests
John Snow 3c5f6114d9 qapi: remove "Example" doc section
Fully eliminate the "Example" sections in QAPI doc blocks now that they
have all been converted to arbitrary rST syntax using the
".. qmp-example::" directive. Update tests to match.

Migrating to the new syntax
---------------------------

The old "Example:" or "Examples:" section syntax is now caught as an
error, but "Example::" is stil permitted as explicit rST syntax for an
un-lexed, generic preformatted text block.

('Example' is not special in this case, any sentence that ends with "::"
will start an indented code block in rST.)

Arbitrary rST for Examples is now possible, but it's strongly
recommended that documentation authors use the ".. qmp-example::"
directive for consistent visual formatting in rendered HTML docs. The
":title:" directive option may be used to add extra information into the
title bar for the example. The ":annotated:" option can be used to write
arbitrary rST instead, with nested "::" blocks applying QMP formatting
where desired.

Other choices available are ".. code-block:: QMP" which will not create
an "Example:" box, or the short-form "::" code-block syntax which will
not apply QMP highlighting when used outside of the qmp-example
directive.

Why?
----

This patch has several benefits:

1. Example sections can now be written more arbitrarily, mixing
   explanatory paragraphs and code blocks however desired.

2. Example sections can now use fully arbitrary rST.

3. All code blocks are now lexed and validated as QMP; increasing
   usability of the docs and ensuring validity of example snippets.

   (To some extent - This patch only gaurantees it lexes correctly, not
   that it's valid under the JSON or QMP grammars. It will catch most
   small mistakes, however.)

4. Each qmp-example can be titled or annotated independently without
   bypassing the QMP lexer/validator.

   (i.e. code blocks are now for *code* only, so we don't have to
   sacrifice exposition for having lexically valid examples.)

NOTE: As with the "Notes" conversion (d461c27973), this patch (and the
      three preceding) may change the rendering order for Examples in
      the current generator. The forthcoming qapidoc rewrite will fix
      this by always generating documentation in source order.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20240717021312.606116-10-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-07-17 10:20:54 +02:00
..
avocado machine_aspeed.py: update to test network for AST2700 2024-07-09 08:05:44 +02:00
bench tests/bench: Add bufferiszero-bench 2024-05-03 08:03:35 -07:00
data tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V 2024-07-03 18:14:07 -04:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker python: enable testing for 3.13 2024-07-12 16:36:20 -04:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
guest-debug tests: Gently exit from GDB when tests complete 2024-05-17 16:49:04 +02:00
image-fuzzer
include
keys
lcitool tests/lcitool: fix debian-i686-cross toolchain prefix 2024-07-05 12:33:32 +01:00
migration tests/qtest/migration-test: Use custom asm bios for ppc64 2024-06-14 14:01:23 -03:00
multiboot
perf/block/qcow2
plugin test/plugins: preserve the instruction record over translations 2024-07-05 12:34:41 +01:00
qapi-schema qapi: remove "Example" doc section 2024-07-17 10:20:54 +02:00
qemu-iotests iotests: Change imports for Python 3.13 2024-07-12 16:36:20 -04:00
qtest tests/qtest/npcm7xx_sdhci: Access the card using its published address 2024-07-05 23:50:12 +02:00
rocker
tcg tests/tcg/aarch64: Add MTE gdbstub tests 2024-07-05 12:35:36 +01:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/data/uefi-boot-images: Add RISC-V ISO image 2024-07-03 18:14:06 -04:00
unit * Fix loongarch64 avocado test 2024-06-13 07:51:58 -07:00
vm tests/vm: remove plain centos image 2024-06-06 10:25:51 +01:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include meson: Drop the .fa library suffix 2024-07-03 18:41:26 +02:00
meson.build tests: only build plugins if TCG is enabled 2024-04-18 11:17:27 +02:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00