From: Fabiano Rosas <farosas@suse.de>
To: Het Gala <het.gala@nutanix.com>, qemu-devel@nongnu.org
Cc: thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com,
peterx@redhat.com, prerna.saxena@nutanix.com,
Het Gala <het.gala@nutanix.com>
Subject: Re: [PATCH 4/4] tests/qtest/migration: Add postcopy migration qtests to use 'channels' argument instead of uri
Date: Wed, 10 Apr 2024 10:15:42 -0300 [thread overview]
Message-ID: <87v84ptl35.fsf@suse.de> (raw)
In-Reply-To: <20240410111541.188504-5-het.gala@nutanix.com>
Het Gala <het.gala@nutanix.com> writes:
> Add qtests to perform postcopy live migration by having list of
> 'channels' argument as the starting point instead of uri string.
> (Note: length of the list is restricted to 1 for now)
>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> ---
> tests/qtest/migration-test.c | 38 ++++++++++++++++++++++++++++++++++--
> 1 file changed, 36 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index fa8a860811..599018baa0 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -1296,13 +1296,17 @@ static int migrate_postcopy_prepare(QTestState **from_ptr,
> migrate_ensure_non_converge(from);
>
> migrate_prepare_for_dirty_mem(from);
> - migrate_incoming_qmp(to, "tcp:127.0.0.1:0", NULL, "{}");
> + if (args->connect_channels) {
> + migrate_incoming_qmp(to, NULL, args->connect_channels, "{}");
> + } else {
> + migrate_incoming_qmp(to, "tcp:127.0.0.1:0", NULL, "{}");
> + }
From an interface perspective it's a bit unexpected to need this
conditional when the migrate_qmp below doesn't need it.
>
> /* Wait for the first serial output from the source */
> wait_for_serial("src_serial");
> wait_for_suspend(from, &src_state);
>
> - migrate_qmp(from, to, NULL, NULL, "{}");
> + migrate_qmp(from, to, args->connect_uri, args->connect_channels, "{}");
>
> migrate_wait_for_dirty_mem(from, to);
>
> @@ -1355,6 +1359,20 @@ static void test_postcopy(void)
> test_postcopy_common(&args);
> }
>
> +static void test_postcopy_channels(void)
> +{
> + MigrateCommon args = {
> + .listen_uri = "defer",
> + .connect_channels = "[ { 'channel-type': 'main',"
> + " 'addr': { 'transport': 'socket',"
> + " 'type': 'inet',"
> + " 'host': '127.0.0.1',"
> + " 'port': '0' } } ]",
> + };
> +
> + test_postcopy_common(&args);
> +}
> +
> static void test_postcopy_suspend(void)
> {
> MigrateCommon args = {
> @@ -1555,6 +1573,18 @@ static void test_postcopy_recovery(void)
> test_postcopy_recovery_common(&args);
> }
>
> +static void test_postcopy_recovery_channels(void)
> +{
> + MigrateCommon args = {
> + .connect_channels = "[ { 'channel-type': 'main',"
> + " 'addr': { 'transport': 'socket',"
> + " 'type': 'inet',"
> + " 'host': '127.0.0.1',"
> + " 'port': '0' } } ]",
> + };
> +
> + test_postcopy_recovery_common(&args);
> +}
> static void test_postcopy_recovery_compress(void)
> {
> MigrateCommon args = {
> @@ -3585,8 +3615,12 @@ int main(int argc, char **argv)
>
> if (has_uffd) {
> migration_test_add("/migration/postcopy/plain", test_postcopy);
> + migration_test_add("/migration/postcopy/channels/plain",
> + test_postcopy_channels);
> migration_test_add("/migration/postcopy/recovery/plain",
> test_postcopy_recovery);
> + migration_test_add("/migration/postcopy/recovery/channels/plain",
> + test_postcopy_recovery_channels);
> migration_test_add("/migration/postcopy/preempt/plain",
> test_postcopy_preempt);
> migration_test_add("/migration/postcopy/preempt/recovery/plain",
next prev parent reply other threads:[~2024-04-10 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 11:15 [PATCH 0/4] tests/qtest/migration: Add postcopy qtests for introducing 'channels' argument with new QAPI syntax Het Gala
2024-04-10 11:15 ` [PATCH 1/4] Revert "migration: modify test_multifd_tcp_none() to use new QAPI syntax" Het Gala
2024-04-10 13:04 ` Fabiano Rosas
2024-04-10 14:53 ` Peter Xu
2024-04-11 14:15 ` Het Gala
2024-04-11 14:26 ` Peter Xu
2024-04-11 18:01 ` Het Gala
2024-04-11 18:42 ` Peter Xu
2024-04-11 19:41 ` Fabiano Rosas
2024-04-12 14:17 ` Peter Xu
2024-04-12 14:58 ` Fabiano Rosas
2024-04-12 21:09 ` Peter Xu
2024-04-11 12:30 ` Het Gala
2024-04-10 11:15 ` [PATCH 2/4] tests/qtest/migration: Replace 'migrate-incoming' qtest_qmp_assert_success with migrate_incoming_qmp Het Gala
2024-04-10 13:05 ` Fabiano Rosas
2024-04-10 11:15 ` [PATCH 3/4] tests/qtest/migration: Add channels parameter in migrate_incoming_qmp Het Gala
2024-04-10 13:14 ` Fabiano Rosas
2024-04-11 12:38 ` Het Gala
2024-04-10 11:15 ` [PATCH 4/4] tests/qtest/migration: Add postcopy migration qtests to use 'channels' argument instead of uri Het Gala
2024-04-10 13:15 ` Fabiano Rosas [this message]
2024-04-11 13:26 ` Het Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v84ptl35.fsf@suse.de \
--to=farosas@suse.de \
--cc=het.gala@nutanix.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=prerna.saxena@nutanix.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).