Het Gala <het.g...@nutanix.com> writes: > Alter migrate_qmp() to allow use of channels parameter, but only > fill the uri with correct port number if there are no channels. > Here we don't want to allow the wrong cases of having both or > none (ex: migrate_qmp_fail). > > Signed-off-by: Het Gala <het.g...@nutanix.com> > Suggested-by: Fabiano Rosas <faro...@suse.de> > --- > tests/qtest/migration-helpers.c | 20 +++++++++++++++----- > tests/qtest/migration-helpers.h | 4 ++-- > tests/qtest/migration-test.c | 28 ++++++++++++++-------------- > 3 files changed, 31 insertions(+), 21 deletions(-) > > diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c > index df4978bf17..0b891351a5 100644 > --- a/tests/qtest/migration-helpers.c > +++ b/tests/qtest/migration-helpers.c > @@ -19,7 +19,6 @@ > #include "qapi/error.h" > #include "qapi/qmp/qlist.h" > > - > #include "migration-helpers.h" > > /* > @@ -154,10 +153,12 @@ void migrate_qmp_fail(QTestState *who, const char *uri, > * qobject_from_jsonf_nofail()) with "uri": @uri spliced in. > */ > void migrate_qmp(QTestState *who, QTestState *to, const char *uri, > - const char *fmt, ...) > + const char *channels, const char *fmt, ...) > { > va_list ap; > QDict *args; > + Error *error_abort = NULL;
Remove this. > + QObject *channels_obj = NULL; > g_autofree char *connect_uri = NULL; > > va_start(ap, fmt);