Module: tools Branch: master Commit: 15486048713f333f213249840730b8e5ba77bc05 URL: https://source.winehq.org/git/tools.git/?a=commit;h=15486048713f333f21324984...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Sep 13 03:07:14 2019 +0200
testbot/LibvirtTool: No need to wait for other TestBot processes.
The pid of any process started by the Engine is recorded in the VM's ChildPid field. Also the Engine kills any tool that would still be running before clearing the ChildPid field. So the Engine would not have started LibvirtTool if another process was using that VM.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/LibvirtTool.pl | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index 46b2793..f031c78 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -297,18 +297,7 @@ sub Monitor() if ($IsPoweredOn) { $ErrMessage = $VM->GetDomain()->PowerOff(); - if (defined $ErrMessage) - { - Error "$ErrMessage\n"; - } - else - { - # Another process might have been trying to connect to the VM's - # TestAgent server. Wait for it to time out so it does not set the - # VM offline right after we have put it back online. - LogMsg "Powered off $VMKey. Sleep until all other processes accessing it are gone.\n"; - sleep(3 * $WaitForToolsInVM); - } + Error "$ErrMessage\n" if (defined $ErrMessage); $IsPoweredOn = undef; } }