[tools] testbot/LibvirtTool: Revert() does not need its own VM object.

Francois Gouget fgouget at codeweavers.com
Tue Feb 8 16:43:24 CST 2022


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/LibvirtTool.pl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 7a865499c2..b6b1fad581 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -447,9 +447,9 @@ sub CheckOff()
   return ChangeStatus("dirty", "off", "done");
 }
 
-sub SetupTestAgentd($$$$)
+sub SetupTestAgentd($$$)
 {
-  my ($VM, $Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
+  my ($Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
 
   Debug(Elapsed($Start), " Setting up the $VMKey TestAgent server\n");
   LogMsg "Setting up the $VMKey TestAgent server\n";
@@ -572,7 +572,6 @@ sub CreateSnapshot($$)
 
 sub Revert()
 {
-  my $VM = CreateVMs()->GetItem($VMKey);
   if (!$Debug and $VM->Status ne "reverting")
   {
     Error("The VM is not ready to be reverted (". $VM->Status .")\n");
@@ -648,7 +647,7 @@ sub Revert()
 
   # Set up the TestAgent server. Note that setting the locale will require a
   # reboot so reset start.count in that case.
-  SetupTestAgentd($VM, $Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
+  SetupTestAgentd($Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
 
   if ($CreateSnapshot)
   {
-- 
2.30.2




More information about the wine-devel mailing list