|
From: | Het Gala |
Subject: | Re: [PATCH v2 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument |
Date: | Sat, 24 Feb 2024 21:24:38 +0530 |
User-agent: | Mozilla Thunderbird |
On 24/02/24 1:42 am, Fabiano Rosas wrote:
Het Gala <het.gala@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' } } ]"}}
because of "channels": "'channels': [ { 'channel-type': ....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.
[...]
Regards,
Het Gala
Regards,
Het Gala
[Prev in Thread] | Current Thread | [Next in Thread] |