tests/qtest/migration: Print migration incoming errors
We're currently just asserting when incoming migration fails. Let's print the error message from QMP as well. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240104142144.9680-6-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
e3b8ad5c13
commit
679a7382a3
@ -111,6 +111,12 @@ void migrate_incoming_qmp(QTestState *to, const char *uri, const char *fmt, ...)
|
|||||||
|
|
||||||
rsp = qtest_qmp(to, "{ 'execute': 'migrate-incoming', 'arguments': %p}",
|
rsp = qtest_qmp(to, "{ 'execute': 'migrate-incoming', 'arguments': %p}",
|
||||||
args);
|
args);
|
||||||
|
|
||||||
|
if (!qdict_haskey(rsp, "return")) {
|
||||||
|
g_autoptr(GString) s = qobject_to_json_pretty(QOBJECT(rsp), true);
|
||||||
|
g_test_message("%s", s->str);
|
||||||
|
}
|
||||||
|
|
||||||
g_assert(qdict_haskey(rsp, "return"));
|
g_assert(qdict_haskey(rsp, "return"));
|
||||||
qobject_unref(rsp);
|
qobject_unref(rsp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user