Francois Gouget : testbot/RevertVM: Mark a VM as offline if WaitForToolsInGuest() fails.

Alexandre Julliard julliard at winehq.org
Wed Oct 24 13:21:02 CDT 2012


Module: tools
Branch: master
Commit: f6578425933ae77ec2b7014ac3380be628a170e8
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=f6578425933ae77ec2b7014ac3380be628a170e8

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Oct 24 12:16:10 2012 +0200

testbot/RevertVM: Mark a VM as offline if WaitForToolsInGuest() fails.

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




More information about the wine-cvs mailing list