docs/devel/qtest: Mention environment variables usage
Document the QTEST_ environment variables. Only include the ones used by QTest itself, don't document test-specific variables as they are more prone to change. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260429003130.15164-4-farosas@suse.de [picked rst-formatted version from Peter Maydell] Signed-off-by: Fabiano Rosas <farosas@suse.de>
Fabiano Rosas committed
Apr 28, 2026 at 21:31 UTC
08421654665c45f147c36b02866efe54e8129546
1 file changed
+44
docs/devel/testing/qtest.rst
+44
@@ -91,3 +91,47 @@ libqtest API reference
91
----------------------
92
93
.. kernel-doc:: tests/qtest/libqtest.h
94
+
95
+
96
+QTest valid environment variables
97
+---------------------------------
98
+
99
+A few environment variables are used to point QTest at artifacts to be
100
+used in the tests, mostly QEMU binaries or to control the behavior of
101
+the tests. Environment variables are set automatically by the build
102
+system, but it can be useful to alter them when running tests
103
+manually. The following are the environment variables recognized by
104
+QTest, not including test-specific ones:
105
+
106
+``QTEST_QEMU_BINARY``
107
+ The QEMU binary itself (generally a ``qemu-system-<arch>`` binary).
108
+
109
+``QTEST_QEMU_ARGS``
110
+ Extra arguments for the QEMU command line.
111
+
112
+``QTEST_QEMU_IMG``
113
+ The ``qemu-img`` binary.
114
+
115
+``QTEST_QEMU_STORAGE_DAEMON_BINARY``
116
+ The ``qemu-storage-daemon`` binary.
117
+
118
+``QTEST_STOP``
119
+ Instruct QTest to stop the QEMU process with SIGSTOP before continuing
120
+ execution.
121
+
122
+``QTEST_LOG``
123
+ Comma-separated list of log domains to allow verbose logging.
124
+ The currently-defined log domains are:
125
+
126
+ ``qmp``
127
+ controls verbose output of QMP command invocations.
128
+
129
+ ``qtest``
130
+ controls verbose output of QTest operations.
131
+
132
+ ``test``
133
+ controls verbose output of tests.
134
+
135
+ A dash ``-`` used in front of a log domain name has the effect
136
+ of enabling verbose logging for all other domains while
137
+ keeping it disabled for the specified domain.