On 24/02/24 6:18 pm, Het Gala wrote:
On 24/02/24 1:42 am, Fabiano Rosas wrote:
Het Gala<het.g...@nutanix.com> writes:
Introduce support for adding a 'channels' argument to migrate_qmp_fail,
migrate_incoming_qmp and migrate_qmp functions within the migration qtest
framework, enabling enhanced control over migration scenarios.
[...]
Write the test like this:
static void test_multifd_tcp_none_channels(void)
{
MigrateCommon args = {
.listen_uri = "defer",
.start_hook = test_migrate_precopy_tcp_multifd_start,
.live = true,
.connect_channels = "'channels': [ { 'channel-type': 'main',"
" 'addr': { 'transport': 'socket',"
" 'type': 'inet',"
" 'host': '127.0.0.1',"
" 'port': '0' } } ]",
.connect_uri = NULL;
};
test_precopy_common(&args);
}
this was the same first approach that I attempted. It won't work because
The final 'migrate' QAPI with channels string would look like
{ "execute": "migrate", "arguments": { "channels": "[ {
"channel-type": "main", "addr": { "transport": "socket", "type":
"inet", "host": "10.117.29.84", "port": "4000" }, "multifd-channels":
2 } ]" } }
Sorry, In your example given above, the output looks like :
{"execute": "migrate", "arguments": {"uri": "tcp:127.0.0.1:0",
"channels": "'channels': [ { 'channel-type': 'main', 'addr': {
'transport': 'socket', 'type': 'inet',
'host': '127.0.0.1', 'port': '0' } } ]"}}
instead of
{ "execute": "migrate", "arguments": { "channels": [ { "channel-type":
"main", "addr": { "transport": "socket", "type": "inet", "host":
"10.117.29.84", "port": "4000" }, "multifd-channels": 2 } ] } }
It would complain, that channels should be an *array* and not a string.
because of /"channels": "'channels': [ { 'channel-type': ....
/
[...]
Regards,
Het Gala
Regards,
Het Gala