autotest/virt-test — pull request #942 by jferlan (2013-10-17 12:31:49+00:00)
Title: virsh.is_dead(): Resolve timing condition

Existing code didn't check for 'in shutdown' condition which led to
odd timing issues in various tests where is_dead() was returning true
during the "Trying to shutdown VM with shell command" path followed
by code attempting a startup which would fail because you cannot start
an already started guest.

Rather than add 'in shutdown' to the list of things to check - I flipped
the check to look for dead states and return true (per the comments). I
also note that 'no state' was returning False previously which could
have caused false positives.

Since the list of checked states could grow over time, I added a check
for all currently known states and just print a message if a state
is not known.