From: Marc MarĂ <marc.mari.barc...@gmail.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Marc MarĂ <marc.mari.barc...@gmail.com> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> --- tests/libqtest.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/tests/libqtest.c b/tests/libqtest.c index 0bf17aa..ed55686 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -402,10 +402,14 @@ QDict *qtest_qmpv(QTestState *s, const char *fmt, va_list ap) /* No need to send anything for an empty QObject. */ if (qobj) { + int log = getenv("QTEST_LOG") != NULL; QString *qstr = qobject_to_json(qobj); const char *str = qstring_get_str(qstr); size_t size = qstring_get_length(qstr); + if (log) { + fprintf(stderr, "%s", str); + } /* Send QMP request */ socket_send(s->qmp_fd, str, size); -- 1.9.3