[4/5] testbot/RevertVM: Mark a VM as offline if WaitForToolsInGuest() fails.

Francois Gouget fgouget at codeweavers.com
Wed Oct 24 05:16:10 CDT 2012


If the tools (i.e. testagentd) don't respond, we will be unable to start tasks on that VM anyway.
---
 testbot/bin/RevertVM.pl |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/testbot/bin/RevertVM.pl b/testbot/bin/RevertVM.pl
index fbf479f..743760f 100755
--- a/testbot/bin/RevertVM.pl
+++ b/testbot/bin/RevertVM.pl
@@ -104,14 +104,11 @@ foreach my $WaitCount (1..3)
 {
   LogMsg "Waiting for ", $VM->Name, " (up to ${WaitForToolsInVM}s)\n";
   $ErrMessage = $VM->WaitForToolsInGuest($WaitForToolsInVM);
-  if (! defined($ErrMessage))
-  {
-    last;
-  }
+  last if (!defined $ErrMessage);
 }
-if (defined($ErrMessage))
+if (defined $ErrMessage)
 {
-  LogMsg "$VMKey Error while waiting for tools: $ErrMessage\n";
+  FatalError "Tools in $VMKey not responding: $ErrMessage", $VM;
 }
 
 if ($SleepAfterRevert != 0)
-- 
1.7.10.4




More information about the wine-patches mailing list