From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Alexander Bulekov <alxndr@bu.edu>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Darren Kenny <darren.kenny@oracle.com>,
Laurent Vivier <lvivier@redhat.com>,
Michael Roth <michael.roth@amd.com>,
Kostiantyn Kostiuk <kkostiuk@redhat.com>
Subject: Re: [PATCH v1 2/3] tests/qtest: Individual verbose switches
Date: Wed, 29 Apr 2026 20:08:22 -0300 [thread overview]
Message-ID: <874iktqs9l.fsf@suse.de> (raw)
In-Reply-To: <afJ3GLYIcN9qeOyU@x1.local>
Peter Xu <peterx@redhat.com> writes:
> On Tue, Apr 28, 2026 at 09:31:29PM -0300, Fabiano Rosas wrote:
>> Allow logging to be set for specific parts of QTest. Having a single
>> QTEST_LOG knob creates an output stream that is almost useless due to
>> spamming from some operations.
>>
>> Add a backward-compatible way of selecting which parts will be made
>> verbose. Reuse the existing QTEST_LOG variable. The new options are:
>>
>> QTEST_LOG=
>> fuzz - fuzz.c
>> qga - unit/test-qga.c
>> qmp - libqmp.c
>> qtest - QTest device, i.e. -qtest-log option
>> test - generic term for usage of all tests
>>
>> E.g.:
>>
>> QTEST_LOG=fuzz,qga,qmp,qtest,test
>> equivalent to QTEST_LOG=1
>>
>> QTEST_LOG=qmp,qtest
>> enables logging of qmp operations from libqmp.c and logging of the
>> qtest device.
>>
>> QTEST_LOG=test,qmp
>> enable test output and libqmp.c output.
>>
>> QTEST_LOG=-qmp
>> enable all output, except for libqmp.c
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>
> Ohhh this is nice..
>
> Acked-by: Peter Xu <peterx@redhat.com>
>
> Some quick thoughts, doesn't need to do it immediately or at all: make the
> parsing of QTEST_LOG var only once might be nice (e.g. switch to flag for
> qtest_verbose()). The other nitpick is would the word "test" too hard to
> guess for what it does? Maybe "misc"?
I'd like to add an _env function, like we did with migration-test. So
all environment stuff is read once there and it's all kept in a single
structure that's exposed to the rest of the code. I see scary messages
in glib code about thread-unsafety of getenv, I would not be surprised
if they start to complain more about it. See my dbus-vmstate-series for
more on that.
About the "test" word, I don't mind changing, but I think "misc" is
worse. My intention long-term is actually to reduce the usage of
QTEST_LOG in tests directly. This should be only for "qtest modules" to
use internally (such as libqmp, libqos). Otherwise the notion of what
counts as verbose gets lost among all the test writers.
The usage in migration-test should be removed at some point. We had an
idea of implementing a filtering scheme like the iotests do, which would
do away with the need for redirecting QEMU's output to devnull.
next prev parent reply other threads:[~2026-04-29 23:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 0:31 [PATCH v1 0/3] tests/qtest: Tweak env variables Fabiano Rosas
2026-04-29 0:31 ` [PATCH v1 1/3] tests/qtest/libqtest: Replace QTEST_TRACE with QTEST_QEMU_ARGS Fabiano Rosas
2026-04-30 13:28 ` Peter Maydell
2026-04-30 14:35 ` Fabiano Rosas
2026-04-29 0:31 ` [PATCH v1 2/3] tests/qtest: Individual verbose switches Fabiano Rosas
2026-04-29 21:24 ` Peter Xu
2026-04-29 23:08 ` Fabiano Rosas [this message]
2026-04-29 0:31 ` [PATCH v1 3/3] docs/devel/qtest: Mention environment variables usage Fabiano Rosas
2026-04-29 22:28 ` Pierrick Bouvier
2026-04-30 13:21 ` Peter Maydell
2026-04-30 13:25 ` Fabiano Rosas
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=874iktqs9l.fsf@suse.de \
--to=farosas@suse.de \
--cc=alxndr@bu.edu \
--cc=darren.kenny@oracle.com \
--cc=kkostiuk@redhat.com \
--cc=lvivier@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=peterx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.