Francois Gouget : testbot/LibvirtTool: Fix detecting the 'high privileges' TestAgentd.

Alexandre Julliard julliard at winehq.org
Thu Feb 24 15:28:29 CST 2022


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Feb 24 19:01:03 2022 +0100

testbot/LibvirtTool: Fix detecting the 'high privileges' TestAgentd.

The SetTime() leeway should be 0 otherwise it may skip actually setting
the time and thus not fail if privileges are insufficient.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/LibvirtTool.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 5e3e7af..ff834ef 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -278,7 +278,7 @@ sub GetPrivilegedTA($)
   my ($TA) = @_;
 
   # Use SetTime() to detect if privileged operations are allowed.
-  return $TA->SetTime() ? $TA : $VM->GetAgent(1);
+  return $TA->SetTime(0) ? $TA : $VM->GetAgent(1);
 }
 
 sub RunAndWait($$)
@@ -582,7 +582,7 @@ sub PrepareVM($)
   # during the build some ccache versions will return a compilation error).
   my $PTA = GetPrivilegedTA($TA);
   FatalError("$VMKey has no privileged TestAgent server\n") if (!$PTA);
-  if (!$PTA->SetTime())
+  if (!$PTA->SetTime(0))
   {
     FatalError("Setting the $VMKey system time failed: ". $PTA->GetLastError() ."\n");
   }




More information about the wine-cvs mailing list