On Wed, Mar 02, 2022 at 05:49:25PM +0000, Daniel P. Berrangé wrote:
>  static void test_precopy_common(const char *listen_uri,
>                                  const char *connect_uri,
>                                  TestMigrateStartHook start_hook,
>                                  TestMigrateFinishHook finish_hook,
> +                                bool expect_fail,
> +                                bool dst_quit,
>                                  bool dirty_ring)
>  {
>      MigrateStart *args = migrate_start_new();
> @@ -875,24 +890,32 @@ static void test_precopy_common(const char *listen_uri,
>  
>      migrate_qmp(from, connect_uri, "{}");
>  
> -    wait_for_migration_pass(from);
> +    if (expect_fail) {
> +        wait_for_migration_fail(from, !dst_quit);

Two more thoughts..

(1) Shall we move MigrateStart creation to be even upper?  Then we avoid
    passing over these parameters but merge these new parameters into
    MigrateStart too.  After all we used to have similar long lists of
    params and we merged them into MigrateStart.

(2) Shall we leverage MigrateStart.hide_stderr?  I saw a bunch of errors
    dumped even if all things run as expected.

-- 
Peter Xu


Reply via email to