Module: tools
Branch: master
Commit: 95c6679d9127dbd07c16ca6d3a804d69b5a9071d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=95c6679d9127dbd07c16ca6…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Jun 17 16:50:12 2022 +0200
testbot/LibvirtTool: Add a trailing linefeed to a log message.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)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 a9622de7..d087b358 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -461,7 +461,7 @@ sub Monitor()
# does not exist. But only revert can tell. For this reason, let revert
# announce when the VM works again.
return 1 if (ChangeStatus("offline", "off", "done"));
- LogMsg("Switching $VMKey from offline to off after ". PrettyElapsed($Start) .".");
+ LogMsg("Switching $VMKey from offline to off after ". PrettyElapsed($Start) .".\n");
return 0;
}
Module: tools
Branch: master
Commit: 399c4bedd782326bba65b0944caeaf91df65a7ef
URL: https://source.winehq.org/git/tools.git/?a=commit;h=399c4bedd782326bba65b09…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Jun 17 10:09:27 2022 +0200
testbot/Engine: Prevent recursion into ScheduleJobs().
Recursion may happen through the ScheduleJobs() -> VM::Run() ->
VMStatusChange() -> ScheduleJobs() chain.
It can cause multiple revert processes to run on the same VM, or even a
revert process to run at the same time as a task.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index cc2ea1f1..1b21ab97 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -945,6 +945,7 @@ sub _PowerOffDirtyVMs($)
}
}
+my $_InScheduleJobs;
my $_LastTaskCounts = "";
=pod
@@ -1003,6 +1004,11 @@ kept on standby so they are ready when their turn comes.
sub ScheduleJobs()
{
+ # Don't let Engine notifications (specifically VMStatusChange) cause
+ # recursion into ScheduleJobs().
+ return if ($_InScheduleJobs);
+ $_InScheduleJobs = 1;
+
my $Sched = _CheckAndClassifyVMs();
my $NeededVMs = _ScheduleTasks($Sched);
_RevertVMs($Sched, $NeededVMs);
@@ -1052,6 +1058,8 @@ sub ScheduleJobs()
$Timeout = 600;
}
AddEvent("ScheduleJobs", $Timeout, 0, \&ScheduleJobs);
+
+ $_InScheduleJobs = undef;
}