[Qemu-devel] [PATCH] tests: Add proper newlines for qmp_fd_receive

Peter Xu posted 1 patch 4 years, 10 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190605102555.23050-1-peterx@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>
tests/libqtest.c | 4 ++++
1 file changed, 4 insertions(+)
[Qemu-devel] [PATCH] tests: Add proper newlines for qmp_fd_receive
Posted by Peter Xu 4 years, 10 months ago
It changes QTEST_LOG=1 results a bit more lovely, from:

{"return": ... }{"execute": "query-migrate"}

{"return": ... }{"execute": "query-migrate"}

Into:

{"execute": "query-migrate"}

{"return": ... }

{"execute": "query-migrate"}

{"return": ... }

CC: Thomas Huth <thuth@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 tests/libqtest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/libqtest.c b/tests/libqtest.c
index 546a875913..d7301d773e 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -532,6 +532,10 @@ QDict *qmp_fd_receive(int fd)
     }
     json_message_parser_destroy(&qmp.parser);
 
+    if (log) {
+        fprintf(stderr, "\n\n");
+    }
+
     return qmp.response;
 }
 
-- 
2.17.1