[PATCH 2/3] qtest: migration: Introduce 'connect_channels' in MigrateCommon struct

Het Gala posted 3 patches 8 months, 2 weeks ago
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
[PATCH 2/3] qtest: migration: Introduce 'connect_channels' in MigrateCommon struct
Posted by Het Gala 8 months, 2 weeks ago
migration QAPIs can now work with either 'channels' or 'uri' as their
argument.

Signed-off-by: Het Gala <het.gala@nutanix.com>
---
 tests/qtest/migration-test.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index e7f2719dcf..0bc69b1943 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -704,6 +704,13 @@ typedef struct {
      */
     const char *connect_uri;
 
+    /*
+     * Optional: list of migration stream channels, each connected
+     * to a dst QEMU. It can be used instead of URI to carry out
+     * the same task as listen_uri or connect_uri.
+     */
+    MigrationChannelList *connect_channels;
+
     /* Optional: callback to run at start to set migration parameters */
     TestMigrateStartHook start_hook;
     /* Optional: callback to run at finish to cleanup */
-- 
2.22.3
Re: [PATCH 2/3] qtest: migration: Introduce 'connect_channels' in MigrateCommon struct
Posted by Peter Xu 8 months, 2 weeks ago
On Fri, Feb 16, 2024 at 09:06:23AM +0000, Het Gala wrote:
> migration QAPIs can now work with either 'channels' or 'uri' as their
> argument.
> 
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
>  tests/qtest/migration-test.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index e7f2719dcf..0bc69b1943 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -704,6 +704,13 @@ typedef struct {
>       */
>      const char *connect_uri;
>  
> +    /*
> +     * Optional: list of migration stream channels, each connected
> +     * to a dst QEMU. It can be used instead of URI to carry out
> +     * the same task as listen_uri or connect_uri.
> +     */
> +    MigrationChannelList *connect_channels;
> +
>      /* Optional: callback to run at start to set migration parameters */
>      TestMigrateStartHook start_hook;
>      /* Optional: callback to run at finish to cleanup */

Please squash this patch into the follow up patch that uses it.  Thanks,

-- 
Peter Xu
Re: [PATCH 2/3] qtest: migration: Introduce 'connect_channels' in MigrateCommon struct
Posted by Het Gala 8 months, 2 weeks ago
On 20/02/24 11:34 am, Peter Xu wrote:
> On Fri, Feb 16, 2024 at 09:06:23AM +0000, Het Gala wrote:
>> migration QAPIs can now work with either 'channels' or 'uri' as their
>> argument.
>>
>> Signed-off-by: Het Gala <het.gala@nutanix.com>
>> ---
>>   tests/qtest/migration-test.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
>> index e7f2719dcf..0bc69b1943 100644
>> --- a/tests/qtest/migration-test.c
>> +++ b/tests/qtest/migration-test.c
>> @@ -704,6 +704,13 @@ typedef struct {
>>        */
>>       const char *connect_uri;
>>   
>> +    /*
>> +     * Optional: list of migration stream channels, each connected
>> +     * to a dst QEMU. It can be used instead of URI to carry out
>> +     * the same task as listen_uri or connect_uri.
>> +     */
>> +    MigrationChannelList *connect_channels;
>> +
>>       /* Optional: callback to run at start to set migration parameters */
>>       TestMigrateStartHook start_hook;
>>       /* Optional: callback to run at finish to cleanup */
> Please squash this patch into the follow up patch that uses it.  Thanks,

Yes sure.

I am also planning to convert this field into a bool (just say whether 
connect_channels would be present or not). It would prove useful for 
positive cases actually where only channel is being used, because if I 
convert them before hand itself port is 0 but kernel converts port 0 and 
gives a random port number for migration. And positive tests fail there.

Will be more clear when I post the v2 patchset. Let me know, if it does 
not sound right then.

Regards,

Het Gala