aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-03-18 10:20:21 +0100
committerThomas Huth <thuth@redhat.com>2025-03-19 07:43:51 +0100
commitbcbd8c0edf712a7d55d9bf020be4b0f21ce3c35c (patch)
tree89f6026746049e0f431dbecf2daf8719e76495f7 /docs
parenta6836b6d49a76b71c43e9571f8bcc6a73b542a77 (diff)
downloadqemu-bcbd8c0edf712a7d55d9bf020be4b0f21ce3c35c.zip
qemu-bcbd8c0edf712a7d55d9bf020be4b0f21ce3c35c.tar.gz
qemu-bcbd8c0edf712a7d55d9bf020be4b0f21ce3c35c.tar.bz2
docs/devel/testing/functional: Add a section about logging
We should tell the users where to find the log file. While we're at it, also rename the "Overview" heading to a more accurate "Introduction to writing tests" instead. Reported-by: Aditya Gupta <adityag@linux.ibm.com> Message-ID: <20250318092021.53719-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/testing/functional.rst22
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst
index a9fa45e..9bc9733 100644
--- a/docs/devel/testing/functional.rst
+++ b/docs/devel/testing/functional.rst
@@ -72,8 +72,26 @@ files around on disk by setting ```QEMU_TEST_KEEP_SCRATCH=1``` as an env
variable. Any preserved files will be deleted the next time the test is run
without this variable set.
-Overview
---------
+Logging
+-------
+
+The framework collects log files for each test in the build directory
+in the following subfolder::
+
+ <builddir>/tests/functional/<arch>/<fileid>.<classid>.<testname>/
+
+There are usually three log files:
+
+* ``base.log`` contains the generic logging information that is written
+ by the calls to the logging functions in the test code (e.g. by calling
+ the ``self.log.info()`` or ``self.log.debug()`` functions).
+* ``console.log`` contains the output of the serial console of the guest.
+* ``default.log`` contains the output of QEMU. This file could be named
+ differently if the test chooses to use a different identifier for
+ the guest VM (e.g. when the test spins up multiple VMs).
+
+Introduction to writing tests
+-----------------------------
The ``tests/functional/qemu_test`` directory provides the ``qemu_test``
Python module, containing the ``qemu_test.QemuSystemTest`` class.