diff mbox series

[RFC,2/2] tests/qtest: Mute -qtest-log

Message ID 20240905210328.25393-3-farosas@suse.de
State New
Headers show
Series qtest: Log verbosity changes | expand

Commit Message

Fabiano Rosas Sept. 5, 2024, 9:03 p.m. UTC
Make the -qtest-log be conditional on the --verbose flag, along with
the existing QTEST_LOG to avoid noisy qtest_memread() messages. Those
are particularly annoying for migration-test because all tests read
guest memory at the end and the QMP messages get lost in a flood of:

[R +1.096069] read 0x63ce000 0x1
[S +1.096071] OK 0xb8
[R +1.096077] read 0x63cf000 0x1
[S +1.096079] OK 0xb8
...

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 tests/qtest/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 347664cea6..9fca9c7260 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -479,7 +479,7 @@  static QTestState *qtest_init_internal(const char *qemu_bin,
                          " -accel qtest"
                          " 2> %s",
                          socket_path,
-                         getenv("QTEST_LOG") ? DEV_STDERR : DEV_NULL,
+                         g_test_verbose() ? DEV_STDERR : DEV_NULL,
                          qmp_socket_path,
                          extra_args ?: "",
                          getenv("QTEST_LOG") ? DEV_STDERR : DEV_NULL);