qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Aditya Gupta" <adityag@linux.ibm.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 6/8] docs/devel/testing/functional: Add a section about logging
Date: Wed, 19 Mar 2025 14:18:49 +0100	[thread overview]
Message-ID: <20250319131851.148817-7-thuth@redhat.com> (raw)
In-Reply-To: <20250319131851.148817-1-thuth@redhat.com>

From: Thomas Huth <thuth@redhat.com>

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>
---
 docs/devel/testing/functional.rst | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst
index a9fa45eac1f..9bc973392aa 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.
-- 
2.48.1



  parent reply	other threads:[~2025-03-19 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 13:18 [PULL 0/8] Functional and s390x patches for v10.0-rc1 Thomas Huth
2025-03-19 13:18 ` [PULL 1/8] hw/virtio: Also include md stubs in case CONFIG_VIRTIO_PCI is not set Thomas Huth
2025-03-19 13:18 ` [PULL 2/8] tests/functional/test_arm_orangepi: rename test class to 'OrangePiMachine' Thomas Huth
2025-03-19 13:18 ` [PULL 3/8] tests/functional: remove all class level fields Thomas Huth
2025-03-19 13:18 ` [PULL 4/8] docs/system: Use the meson binary from the pyvenv Thomas Huth
2025-03-19 13:18 ` [PULL 5/8] docs/system/arm: Use "functional tests" instead of "integration tests" Thomas Huth
2025-03-19 13:18 ` Thomas Huth [this message]
2025-03-19 13:18 ` [PULL 7/8] tests/functional/test_x86_64_kvm_xen: Remove avocado tags Thomas Huth
2025-03-19 13:18 ` [PULL 8/8] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test Thomas Huth

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=20250319131851.148817-7-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=adityag@linux.ibm.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).