Francois Gouget : testbot/LibvirtTool: Avoid a race between shutdown.exe and TestAgentd.

Alexandre Julliard julliard at winehq.org
Thu Feb 10 16:10:05 CST 2022


Module: tools
Branch: master
Commit: 122e1af344c8d333b6d6414a3aba5687e3c13fce
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=122e1af344c8d333b6d6414a3aba5687e3c13fce

Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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());




More information about the wine-cvs mailing list