[Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' object into migrat...

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8c47168cca012aa6f64dc50eebdb126ab81e360a
  
https://github.com/qemu/qemu/commit/8c47168cca012aa6f64dc50eebdb126ab81e360a
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add 'to' object into migrate_qmp()

Add the 'to' object into migrate_qmp(), so we can use
migrate_get_socket_address() inside migrate_qmp() to get
the port value. This is not applied to other migrate_qmp*
because they don't need the port.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-2-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d1155fd485d54e55fd26804c04635404ce5da43b
  
https://github.com/qemu/qemu/commit/d1155fd485d54e55fd26804c04635404ce5da43b
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Replace connect_uri and move 
migrate_get_socket_address inside migrate_qmp

Move the calls to migrate_get_socket_address() into migrate_qmp().
Get rid of connect_uri and replace it with args->connect_uri only
because 'to' object will help to generate connect_uri with the
correct port number.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-3-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  
https://github.com/qemu/qemu/commit/4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Replace migrate_get_connect_uri inplace of 
migrate_get_socket_address

Refactor migrate_get_socket_address to internally utilize 'socket-address'
parameter, reducing redundancy in the function definition.

migrate_get_socket_address implicitly converts SocketAddress into str.
Move migrate_get_socket_address inside migrate_get_connect_uri which
should return the uri string instead.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-4-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 387dc407db6137cec479f6c6efb3851464ea9026
  
https://github.com/qemu/qemu/commit/387dc407db6137cec479f6c6efb3851464ea9026
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp_fail

Alter migrate_qmp_fail() to allow both uri and channels
independently. For channels, convert string to a Dict.
No dealing with migrate_get_socket_address() here because
we will fail before starting the migration anyway.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-5-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  
https://github.com/qemu/qemu/commit/2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update 
migration port value

migrate_get_connect_qdict gets qdict with the dst QEMU parameters.

migrate_set_ports() from list of channels reads each QDict for port,
and fills the port with correct value in case it was 0 in the test.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-6-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  
https://github.com/qemu/qemu/commit/d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp

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 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-7-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  

[Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' object into migrat...

2024-04-23 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 8c47168cca012aa6f64dc50eebdb126ab81e360a
  
https://github.com/qemu/qemu/commit/8c47168cca012aa6f64dc50eebdb126ab81e360a
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add 'to' object into migrate_qmp()

Add the 'to' object into migrate_qmp(), so we can use
migrate_get_socket_address() inside migrate_qmp() to get
the port value. This is not applied to other migrate_qmp*
because they don't need the port.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-2-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d1155fd485d54e55fd26804c04635404ce5da43b
  
https://github.com/qemu/qemu/commit/d1155fd485d54e55fd26804c04635404ce5da43b
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Replace connect_uri and move 
migrate_get_socket_address inside migrate_qmp

Move the calls to migrate_get_socket_address() into migrate_qmp().
Get rid of connect_uri and replace it with args->connect_uri only
because 'to' object will help to generate connect_uri with the
correct port number.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-3-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  
https://github.com/qemu/qemu/commit/4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Replace migrate_get_connect_uri inplace of 
migrate_get_socket_address

Refactor migrate_get_socket_address to internally utilize 'socket-address'
parameter, reducing redundancy in the function definition.

migrate_get_socket_address implicitly converts SocketAddress into str.
Move migrate_get_socket_address inside migrate_get_connect_uri which
should return the uri string instead.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-4-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 387dc407db6137cec479f6c6efb3851464ea9026
  
https://github.com/qemu/qemu/commit/387dc407db6137cec479f6c6efb3851464ea9026
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp_fail

Alter migrate_qmp_fail() to allow both uri and channels
independently. For channels, convert string to a Dict.
No dealing with migrate_get_socket_address() here because
we will fail before starting the migration anyway.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-5-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  
https://github.com/qemu/qemu/commit/2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update 
migration port value

migrate_get_connect_qdict gets qdict with the dst QEMU parameters.

migrate_set_ports() from list of channels reads each QDict for port,
and fills the port with correct value in case it was 0 in the test.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-6-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  
https://github.com/qemu/qemu/commit/d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp

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 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-7-het.g...@nutanix.com
Signed-off-by: Peter Xu