qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/acceptance/migration.py: Wait for both sides
@ 2020-05-28 11:24 Dr. David Alan Gilbert (git)
  2020-05-28 11:30 ` Philippe Mathieu-Daudé
  2020-05-31 11:58 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-05-28 11:24 UTC (permalink / raw)
  To: qemu-devel, alex.bennee, ovoshcha; +Cc: philmd

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

When the source finishes migration the destination will still be
receiving the data sent by the source, so it might not have quite
finished yet, so won't quite have reached 'completed'.
This lead to occasional asserts in the next few checks.

After the source has finished, check the destination as well.
(We can't just switch to checking the destination, because it doesn't
give a status until it has started receiving the migration).

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/acceptance/migration.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 0365289cda..792639cb69 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -35,6 +35,10 @@ class Migration(Test):
                       timeout=self.timeout,
                       step=0.1,
                       args=(src_vm,))
+        wait.wait_for(self.migration_finished,
+                      timeout=self.timeout,
+                      step=0.1,
+                      args=(dst_vm,))
         self.assertEqual(src_vm.command('query-migrate')['status'], 'completed')
         self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed')
         self.assertEqual(dst_vm.command('query-status')['status'], 'running')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/acceptance/migration.py: Wait for both sides
  2020-05-28 11:24 [PATCH] tests/acceptance/migration.py: Wait for both sides Dr. David Alan Gilbert (git)
@ 2020-05-28 11:30 ` Philippe Mathieu-Daudé
  2020-05-31 11:58 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-28 11:30 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, alex.bennee, ovoshcha

On 5/28/20 1:24 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> When the source finishes migration the destination will still be
> receiving the data sent by the source, so it might not have quite
> finished yet, so won't quite have reached 'completed'.
> This lead to occasional asserts in the next few checks.
> 
> After the source has finished, check the destination as well.
> (We can't just switch to checking the destination, because it doesn't
> give a status until it has started receiving the migration).
> 

Fixes: a7abb53765 ?

> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/acceptance/migration.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 0365289cda..792639cb69 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -35,6 +35,10 @@ class Migration(Test):
>                        timeout=self.timeout,
>                        step=0.1,
>                        args=(src_vm,))
> +        wait.wait_for(self.migration_finished,
> +                      timeout=self.timeout,

I'm not sure the Test.timeout is well used (it represents the maximum
total time the framework will wait this test can take). Anyway this is
incorrectly used before your patch, so I wouldn't bother...

> +                      step=0.1,
> +                      args=(dst_vm,))

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>          self.assertEqual(src_vm.command('query-migrate')['status'], 'completed')
>          self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed')
>          self.assertEqual(dst_vm.command('query-status')['status'], 'running')
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/acceptance/migration.py: Wait for both sides
  2020-05-28 11:24 [PATCH] tests/acceptance/migration.py: Wait for both sides Dr. David Alan Gilbert (git)
  2020-05-28 11:30 ` Philippe Mathieu-Daudé
@ 2020-05-31 11:58 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-31 11:58 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, alex.bennee, ovoshcha

On 5/28/20 1:24 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> When the source finishes migration the destination will still be
> receiving the data sent by the source, so it might not have quite
> finished yet, so won't quite have reached 'completed'.
> This lead to occasional asserts in the next few checks.
> 
> After the source has finished, check the destination as well.
> (We can't just switch to checking the destination, because it doesn't
> give a status until it has started receiving the migration).
> 
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/acceptance/migration.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 0365289cda..792639cb69 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -35,6 +35,10 @@ class Migration(Test):
>                        timeout=self.timeout,
>                        step=0.1,
>                        args=(src_vm,))
> +        wait.wait_for(self.migration_finished,
> +                      timeout=self.timeout,
> +                      step=0.1,
> +                      args=(dst_vm,))
>          self.assertEqual(src_vm.command('query-migrate')['status'], 'completed')
>          self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed')
>          self.assertEqual(dst_vm.command('query-status')['status'], 'running')
> 

Thanks, applied to my python-next tree:
https://gitlab.com/philmd/qemu/commits/python-next



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-31 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 11:24 [PATCH] tests/acceptance/migration.py: Wait for both sides Dr. David Alan Gilbert (git)
2020-05-28 11:30 ` Philippe Mathieu-Daudé
2020-05-31 11:58 ` Philippe Mathieu-Daudé

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).