Re: [Qemu-devel] [PATCH for-3.0 9/9] tests: hide stderr for postcopy recovery test

2018-07-05 Thread Juan Quintela
Peter Xu  wrote:
> We dumped something when network failure happens.  We should avoid those
> messages to be dumped when running the tests:
>
>   $ ./tests/migration-test -p /x86_64/migration/postcopy/recovery
>   /x86_64/migration/postcopy/recovery: qemu-system-x86_64: 
> check_section_footer: Read section footer failed: -5
>   qemu-system-x86_64: Detected IO failure for postcopy. Migration paused.
>   qemu-system-x86_64: Detected IO failure for postcopy. Migration paused.
>   OK
>
> After the patch:
>
>   $ ./tests/migration-test -p /x86_64/migration/postcopy/recovery
>   /x86_64/migration/postcopy/recovery: OK
>
> Signed-off-by: Peter Xu 

Reviewed-by: Juan Quintela 



Re: [Qemu-devel] [PATCH for-3.0 9/9] tests: hide stderr for postcopy recovery test

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote:
> We dumped something when network failure happens.  We should avoid those
> messages to be dumped when running the tests:
> 
>   $ ./tests/migration-test -p /x86_64/migration/postcopy/recovery
>   /x86_64/migration/postcopy/recovery: qemu-system-x86_64: 
> check_section_footer: Read section footer failed: -5
>   qemu-system-x86_64: Detected IO failure for postcopy. Migration paused.
>   qemu-system-x86_64: Detected IO failure for postcopy. Migration paused.
>   OK



Reviewed-by: Dr. David Alan Gilbert 

> After the patch:
> 
>   $ ./tests/migration-test -p /x86_64/migration/postcopy/recovery
>   /x86_64/migration/postcopy/recovery: OK
> 
> Signed-off-by: Peter Xu 
> ---
>  tests/migration-test.c | 9 +
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/migration-test.c b/tests/migration-test.c
> index 182fc88e93..96e69dab99 100644
> --- a/tests/migration-test.c
> +++ b/tests/migration-test.c
> @@ -567,12 +567,13 @@ static void test_deprecated(void)
>  }
>  
>  static void migrate_postcopy_prepare(QTestState **from_ptr,
> - QTestState **to_ptr)
> + QTestState **to_ptr,
> + bool hide_error)
>  {
>  char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
>  QTestState *from, *to;
>  
> -test_migrate_start(, , uri, false);
> +test_migrate_start(, , uri, hide_error);
>  
>  migrate_set_capability(from, "postcopy-ram", "true");
>  migrate_set_capability(to, "postcopy-ram", "true");
> @@ -615,7 +616,7 @@ static void test_postcopy(void)
>  {
>  QTestState *from, *to;
>  
> -migrate_postcopy_prepare(, );
> +migrate_postcopy_prepare(, , false);
>  migrate_postcopy_start(from, to);
>  migrate_postcopy_complete(from, to);
>  }
> @@ -625,7 +626,7 @@ static void test_postcopy_recovery(void)
>  QTestState *from, *to;
>  char *uri;
>  
> -migrate_postcopy_prepare(, );
> +migrate_postcopy_prepare(, , true);
>  
>  /* Turn postcopy speed down, 4K/s is slow enough on any machines */
>  migrate_set_parameter(from, "max-postcopy-bandwidth", "4096");
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK