Module: tools
Branch: master
Commit: e1b54bf69625998852857dc1a59b322e6262b987
URL: https://source.winehq.org/git/tools.git/?a=commit;h=e1b54bf69625998852857dc…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 17 12:36:05 2019 +0200
testbot/WineRunTask: Make the GetAgent() parameter more explicit.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunTask.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 432bf51..d987df7 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -411,7 +411,7 @@ if (!$TA->SetTime())
{
# Not a fatal error. Try the next port in case the VM runs a privileged
# TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent(1);
+ my $PrivilegedTA = $VM->GetAgent("privileged");
if (!$PrivilegedTA->SetTime())
{
LogTaskError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() .". Maybe the TestAgentd process is missing the required privileges.\n");
Module: tools
Branch: master
Commit: 30c30200c7caff683b0c93455212d4390dd0137e
URL: https://source.winehq.org/git/tools.git/?a=commit;h=30c30200c7caff683b0c934…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 17 12:35:15 2019 +0200
testbot/Engine: Ignore ChildPid & ChildDeadline for maintenance VMs.
For debugging it is useful to set a VM in maintenance mode and then
manually run scripts operating on that VM. When doing so ChildPid is
undefined since it is normally set by the Engine when starting the
script. But the scripts may modify other VM fields, including
ChildDeadline.
But when the Scheduler sees such a 'left-over' ChildDeadline field it
normally marks the VM as dirty and powers it off, thus interfering
with the script being tested.
So modify the Scheduler to ignore ChildDeadline for maintenance VMs
whether for cleanup or to compute when to reschedule next.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 3ec51d2..569dff7 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -350,8 +350,13 @@ sub _CheckAndClassifyVMs()
}
else
{
- if (defined $VM->ChildPid or defined $VM->ChildDeadline or
- $VM->Status =~ /^(?:running|reverting|sleeping)$/)
+ if ($VM->Status eq "maintenance")
+ {
+ # Don't touch the VM while the administrator is working on it
+ $Sched->{busyvms}->{$VMKey} = 1;
+ }
+ elsif (defined $VM->ChildPid or defined $VM->ChildDeadline or
+ $VM->Status =~ /^(?:running|reverting|sleeping)$/)
{
# The VM is missing its child process or it died unexpectedly. Mark
# the VM dirty so a revert or shutdown brings it back to a known state.
@@ -381,11 +386,6 @@ sub _CheckAndClassifyVMs()
# Ignore the VM for this round since we cannot use it
$Sched->{busyvms}->{$VMKey} = 1;
}
- elsif ($VM->Status eq "maintenance")
- {
- # Don't touch the VM while the administrator is working on it
- $Sched->{busyvms}->{$VMKey} = 1;
- }
elsif ($VM->Status ne "off")
{
LogMsg "Unexpected $VMKey status ". $VM->Status ."\n";
@@ -1025,7 +1025,7 @@ sub ScheduleJobs()
$VMs->FilterEnabledRole();
foreach my $VM (@{$VMs->GetItems()})
{
- if (defined $VM->ChildDeadline and
+ if ($VM->Status ne "maintenance" and defined $VM->ChildDeadline and
(!defined $FirstDeadline or $VM->ChildDeadline < $FirstDeadline))
{
$FirstDeadline = $VM->ChildDeadline;
Module: tools
Branch: master
Commit: a47a8ac5a1bdafee182e1e6814d5d30f9de4146e
URL: https://source.winehq.org/git/tools.git/?a=commit;h=a47a8ac5a1bdafee182e1e6…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 17 12:34:47 2019 +0200
testbot/TestAgent: Fix handling of connection timeouts.
$@ does not just contain the die string we provided but also where die
was called.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/TestAgent.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index a4a2f49..d3d7137 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -938,7 +938,7 @@ sub _Connect($)
if ($@)
{
- if ($@ eq "timeout")
+ if ($@ =~ /^timeout /)
{
$self->_SetError($FATAL, "Timed out in $Step while connecting to $self->{connection}");
}