Skip to content

Commit f4a1b65

Browse files
Fam Zhengkevmw
authored andcommitted
docs: Describe using images in writing iotests
Signed-off-by: Fam Zheng <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: John Snow <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent a1c81f4 commit f4a1b65

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/devel/testing.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,17 @@ comparable library support for invoking and interacting with QEMU programs. If
255255
you opt for Python, it is strongly recommended to write Python 3 compatible
256256
code.
257257

258+
Both Python and Bash frameworks in iotests provide helpers to manage test
259+
images. They can be used to create and clean up images under the test
260+
directory. If no I/O or any protocol specific feature is needed, it is often
261+
more convenient to use the pseudo block driver, ``null-co://``, as the test
262+
image, which doesn't require image creation or cleaning up. Avoid system-wide
263+
devices or files whenever possible, such as ``/dev/null`` or ``/dev/zero``.
264+
Otherwise, image locking implications have to be considered. For example,
265+
another application on the host may have locked the file, possibly leading to a
266+
test failure. If using such devices are explicitly desired, consider adding
267+
``locking=off`` option to disable image locking.
268+
258269
Docker based tests
259270
==================
260271

0 commit comments

Comments
 (0)