diff mbox series

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

Message ID 20240216090624.75445-3-het.gala@nutanix.com (mailing list archive)
State New, archived
Headers show
Series qtest: migration: Add validation tests for 'channels' argument in migrate QAPIs | expand

Commit Message

Het Gala Feb. 16, 2024, 9:06 a.m. UTC
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(+)

Comments

Peter Xu Feb. 20, 2024, 6:04 a.m. UTC | #1
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,
Het Gala Feb. 20, 2024, 6:43 p.m. UTC | #2
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
diff mbox series

Patch

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 */