FYI: This 2 patches are rebased on top of another
(tests/qtest/migration: Add tests for introducing 'channels' argument in
migrate QAPIs) series.
Can find the build for both the patches here:
https://gitlab.com/galahet/Qemu/-/pipelines/1219841944
On 20/03/24 2:18 am, Het Gala wrote:
'object' can return NULL if there is no socket-address, such as with a
file migration. Then the visitor code below fails and the test crashes.
Ignore and return NULL when socket-address is missing in the reply so
we don't break future tests that use a non-socket type.
Suggested-by: Fabiano Rosas <faro...@suse.de>
Signed-off-by: Het Gala <het.g...@nutanix.com>
---
tests/qtest/migration-helpers.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c
index b2a90469fb..fb7156f09a 100644
--- a/tests/qtest/migration-helpers.c
+++ b/tests/qtest/migration-helpers.c
@@ -90,6 +90,10 @@ static SocketAddress *migrate_get_socket_address(QTestState
*who)
QObject *object;
rsp = migrate_query(who);
+
+ if (!qdict_haskey(rsp, "socket-address")) {
+ return NULL;
+ }
object = qdict_get(rsp, "socket-address");
iv = qobject_input_visitor_new(object);
Regards,
Het Gala