Module: tools
Branch: master
Commit: 89f32e99c754122a4075528803b6369ea4d82489
URL: https://source.winehq.org/git/tools.git/?a=commit;h=89f32e99c754122a4075528…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Sep 23 16:59:31 2019 +0200
testbot: Requeue the task if the VM is not ready for it.
In order to run a task a VM should be in the 'running' state and powered
on. If either check fails that's not the fault of the task and a second
attempt may succeed. So don't end the task with a boterror. Instead
requeue it and put the VM offline so its true state is evaluated (and
notify the administrator of course).
This implies only resetting the VM error count after successfully
running a task otherwise we could get into an infinite loop putting it
offline at the start of every task.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 1 -
testbot/bin/WineRunBuild.pl | 32 ++++++++++++++++++++++---
testbot/bin/WineRunReconfig.pl | 37 ++++++++++++++++++++++++----
testbot/bin/WineRunTask.pl | 37 ++++++++++++++++++++++++----
testbot/bin/WineRunWineTest.pl | 41 +++++++++++++++++++++++++++-----
testbot/lib/WineTestBot/LibvirtDomain.pm | 13 ++++++++++
6 files changed, 143 insertions(+), 18 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=89f32e99c754122a407…
Module: tools
Branch: master
Commit: d1075ec8f78e9e4e928b4f7cceb15ead53b3a9ed
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d1075ec8f78e9e4e928b4f7…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Sep 23 19:22:00 2019 +0200
testbot/Engine: Fix recording the new sacrificed VM status.
The status will not be 'dirty' if VM::RunPowerOff() failed.
Recording the right status is important otherwise ScheduleJobs() will
attempt to record de VM's current status in its catch-all loop,
resulting in a fatal 'Could not change key' error.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 4128e9e..530a2ee 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -764,10 +764,10 @@ sub _SacrificeVM($$$)
$Sched->{busyvms}->{$VictimKey} = 1;
$Host->{$Victim->Status}--;
$Host->{dirty}++;
- $Victim->RecordStatus($Sched->{records}, $Victim->Status eq "dirty" ? "dirty poweroff" : "dirty sacrifice");
$Victim->KillChild();
my $ErrMessage = $Victim->RunPowerOff();
LogMsg "$ErrMessage\n" if (defined $ErrMessage);
+ $Victim->RecordStatus($Sched->{records}, $Victim->Status eq "dirty" ? "dirty poweroff" : $VM->Status ." sacrifice");
return 1;
}