avocado-framework/avocado-virt — pull request #19 by lmr (2014-11-24 11:47:48+00:00)
Title: avocado.virt: Fix migration progress tracking logic

My original code considered any state that did not match
'active' to a migration completed state (we've been using
it for ages in virt-test), but now we have a new state,
'setup', that might appear for a little bit after the
migration process starts.

This way, we proceed and kill the src, failing this way
the migration process. This is wrong, and we should opt
for a saner way to verify whether migration ends:

* Get the output of 'info migrate'
* If it says 'completed', then everything is fine, let's
end migration
* If it says 'failed', then the process obviously failed,
let's end the test with a failure
* Every other status, we keep on waiting

If we get to the end of timeout and neither 'completed'
nor 'failed' appears, we fail the test saying that the
migration couldn't finish after the timeout window.

Let's also make this window configurable, and let people
to set it in the avocado command line.

Signed-off-by: Lucas Meneghel Rodrigues