Module: tools Branch: master Commit: 122e1af344c8d333b6d6414a3aba5687e3c13fce URL: https://source.winehq.org/git/tools.git/?a=commit;h=122e1af344c8d333b6d6414a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Feb 10 19:51:55 2022 +0100
testbot/LibvirtTool: Avoid a race between shutdown.exe and TestAgentd.
"shutdown.exe /p" waits for no process which may give it a slight edge in not getting stuck; but it also does not wait for TestAgentd to reply to the Run() RPC. "shutdown.exe /s" does not seem to have this problem (and supports /t if need be).
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/LibvirtTool.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index 4b84f9b..0cccd12 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -292,7 +292,7 @@ sub ShutDown() Debug(Elapsed($Start), " Performing a clean shutdown of $VMKey/$CurrentSnapshot\n"); LogMsg "Performing a clean shutdown of $VMKey/$CurrentSnapshot\n"; my $Cmd = $VM->Type =~ /^win(?:32|64)$/ ? - ["shutdown.exe", "/p", "/d", "00:00"] : + ["shutdown.exe", "/s", "/d", "00:00", "/t", "0"] : ["/sbin/shutdown", "--poweroff", "now"]; Debug(Elapsed($Start), " Running @$Cmd\n"); my $PTA = GetPrivilegedTA($VM->GetAgent());