qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 14/18] tests: convert XBZRLE migration test to use common hel


From: Peter Xu
Subject: Re: [PATCH 14/18] tests: convert XBZRLE migration test to use common helper
Date: Mon, 7 Mar 2022 16:01:35 +0800

On Wed, Mar 02, 2022 at 05:49:28PM +0000, Daniel P. Berrangé wrote:
> @@ -1255,6 +1259,7 @@ static void 
> test_precopy_unix_common(TestMigrateStartHook start_hook,
>                                       TestMigrateFinishHook finish_hook,
>                                       bool expect_fail,
>                                       bool dst_quit,
> +                                     unsigned int iterations,
>                                       bool dirty_ring)
>  {
>      g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
> @@ -1265,6 +1270,7 @@ static void 
> test_precopy_unix_common(TestMigrateStartHook start_hook,
>                          finish_hook,
>                          expect_fail,
>                          dst_quit,
> +                        iterations,
>                          dirty_ring);
>  }
>  
> @@ -1274,6 +1280,7 @@ static void test_precopy_unix_plain(void)
>                               NULL, /* finish_hook */
>                               false, /* expect_fail */
>                               false, /* dst_quit */
> +                             1, /* iterations */
>                               false /* dirty_ring */);
>  }
>  
> @@ -1283,6 +1290,7 @@ static void test_precopy_unix_dirty_ring(void)
>                               NULL, /* finish_hook */
>                               false, /* clientReject */
>                               false, /* dst_quit */
> +                             1, /* iterations */
>                               true /* dirty_ring */);
>  }
>  
> @@ -1293,6 +1301,7 @@ static void test_precopy_unix_tls_psk(void)
>                               test_migrate_tls_psk_finish,
>                               false, /* expect_fail */
>                               false, /* dst_quit */
> +                             1, /* iterations */
>                               false /* dirty_ring */);
>  }
>  
> @@ -1303,6 +1312,7 @@ static void 
> test_precopy_unix_tls_x509_default_host(void)
>                               test_migrate_tls_x509_finish,
>                               true, /* expect_fail */
>                               true, /* dst_quit */
> +                             1, /* iterations */
>                               false /* dirty_ring */);
>  }
>  
> @@ -1312,6 +1322,7 @@ static void 
> test_precopy_unix_tls_x509_override_host(void)
>                               test_migrate_tls_x509_finish,
>                               false, /* expect_fail */
>                               false, /* dst_quit */
> +                             1, /* iterations */
>                               false /* dirty_ring */);

Another side benefit to merge parameters (e.g. the new "iterations") into
MigrateStart (which I mentioned in the other thread) is that we don't need
to touch the value in every test if there's a default, because we will set
the default in migrate_start_new() and we only need a tweak on tests that
want to overwrite the default values.

Thanks,

-- 
Peter Xu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]