qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Het Gala <het.gala@nutanix.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, thuth@redhat.com,
	lvivier@redhat.com, pbonzini@redhat.com, peterx@redhat.com,
	Het Gala <het.gala@nutanix.com>
Subject: Re: [PATCH v3 6/7] Add multifd_tcp_plain test using list of channels instead of uri
Date: Wed, 06 Mar 2024 12:07:51 -0300	[thread overview]
Message-ID: <87edcns8jc.fsf@suse.de> (raw)
In-Reply-To: <20240306104958.39857-7-het.gala@nutanix.com>

Het Gala <het.gala@nutanix.com> writes:

> Add a positive test to check multifd live migration but this time
> using list of channels (restricted to 1) as the starting point
> instead of simple uri string.
>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> Suggested-by: Fabiano Rosas <farosas@suse.de>
> ---
>  tests/qtest/migration-test.c | 29 ++++++++++++++++++++++++++---
>  1 file changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index f94fe713b2..05e5f3ebe5 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -659,6 +659,12 @@ typedef struct {
>       */
>      const char *connect_uri;
>  
> +    /*
> +     * Optional: the JSON formatted list of URIs for the src
> +     * QEMU to connect to
> +     */

You could add some words here mentioning that a port of '0' will be
automatically converted to the correct port that the destination is
using.

> +    const char *connect_channels;
> +
>      /* Optional: callback to run at start to set migration parameters */
>      TestMigrateStartHook start_hook;
>      /* Optional: callback to run at finish to cleanup */
> @@ -2623,7 +2629,7 @@ test_migrate_precopy_tcp_multifd_zstd_start(QTestState *from,
>  }
>  #endif /* CONFIG_ZSTD */
>  
> -static void test_multifd_tcp_none(void)
> +static void test_multifd_tcp_uri_none(void)
>  {
>      MigrateCommon args = {
>          .listen_uri = "defer",
> @@ -2638,6 +2644,21 @@ static void test_multifd_tcp_none(void)
>      test_precopy_common(&args);
>  }
>  
> +static void test_multifd_tcp_channels_none(void)
> +{
> +    MigrateCommon args = {
> +        .listen_uri = "defer",
> +        .start_hook = test_migrate_precopy_tcp_multifd_start,
> +        .live = true,
> +        .connect_channels = "[ { 'channel-type': 'main',"
> +                            "    'addr': { 'transport': 'socket',"
> +                            "              'type': 'inet',"
> +                            "              'host': '127.0.0.1',"
> +                            "              'port': '0' } } ]",
> +    };
> +    test_precopy_common(&args);
> +}
> +
>  static void test_multifd_tcp_zlib(void)
>  {
>      MigrateCommon args = {
> @@ -3531,8 +3552,10 @@ int main(int argc, char **argv)
>                                 test_migrate_dirty_limit);
>          }
>      }
> -    migration_test_add("/migration/multifd/tcp/plain/none",
> -                       test_multifd_tcp_none);
> +    migration_test_add("/migration/multifd/tcp/uri/plain/none",
> +                       test_multifd_tcp_uri_none);
> +    migration_test_add("/migration/multifd/tcp/channels/plain/none",
> +                       test_multifd_tcp_channels_none);

We should eventually make a pass to standardize/simplify these
strings. We could have a little "grammar" defined on how to construct
them.

/<test-type>/<migration-mode>/<transport>/<invocation>/<compression>/<encryption>

test-type      :: migrate | validate
migration-mode :: multifd | precopy | postcopy
transport      :: tcp | fd | unix | file
invocation     :: uri | channels
compression    :: zlib | zstd | none
encryption     :: tls | plain

Anyway, work for the future.


  reply	other threads:[~2024-03-06 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 10:49 [PATCH v3 0/7] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs Het Gala
2024-03-06 10:49 ` [PATCH v3 1/7] Add 'to' object into migrate_qmp() Het Gala
2024-03-06 14:37   ` Fabiano Rosas
2024-03-06 10:49 ` [PATCH v3 2/7] Replace connect_uri and move migrate_get_socket_address inside migrate_qmp Het Gala
2024-03-06 14:37   ` Fabiano Rosas
2024-03-06 10:49 ` [PATCH v3 3/7] Add channels parameter in migrate_qmp_fail Het Gala
2024-03-06 14:40   ` Fabiano Rosas
2024-03-06 15:10     ` Het Gala
2024-03-06 10:49 ` [PATCH v3 4/7] Add migrate_set_ports into migrate_qmp to change migration port number Het Gala
2024-03-06 14:36   ` Fabiano Rosas
2024-03-06 15:06     ` Het Gala
2024-03-06 16:01       ` Fabiano Rosas
2024-03-06 19:36         ` Het Gala
2024-03-06 21:30         ` Het Gala
2024-03-07 11:37           ` Fabiano Rosas
2024-03-06 10:49 ` [PATCH v3 5/7] Add channels parameter in migrate_qmp Het Gala
2024-03-06 14:42   ` Fabiano Rosas
2024-03-06 15:31     ` Het Gala
2024-03-06 10:49 ` [PATCH v3 6/7] Add multifd_tcp_plain test using list of channels instead of uri Het Gala
2024-03-06 15:07   ` Fabiano Rosas [this message]
2024-03-06 18:40     ` Het Gala
2024-03-06 10:49 ` [PATCH v3 7/7] Add negative tests to validate migration QAPIs Het Gala
2024-03-06 15:08   ` Fabiano Rosas
2024-03-06 12:55 ` [PATCH v3 0/7] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs 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=87edcns8jc.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=het.gala@nutanix.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.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).