Module: tools
Branch: master
Commit: 489a36c8f60b146d5be6dc29f1b6e627d98e6de1
URL: https://source.winehq.org/git/tools.git/?a=commit;h=489a36c8f60b146d5be6dc2…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Sep 26 13:36:44 2019 +0200
testbot/LibvirtTool: Create a reconfig job for new live Build/Wine VM snapshots.
Only the live snapshots are kept up to date by the TestBot. So Wine
will always be out of date in powered off snapshots making any live
snapshot created from them unusable. The fix is to create a high
priority reconfig job so they are brought up to date before being
used for any other task.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 37f95e9..f6e2d4f 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -562,6 +562,24 @@ sub Revert()
{
$DomainSnapshot .= "-live";
CreateSnapshot($Domain, $DomainSnapshot);
+
+ if ($VM->Type eq "build" or $VM->Type eq "wine")
+ {
+ require WineTestBot::SpecialJobs;
+ $ErrMessage = WineTestBot::SpecialJobs::AddReconfigJob([$VM], $VM->Name, $VM->Type);
+ if (defined $ErrMessage)
+ {
+ Error("Could not create a job to update and rebuild Wine on the $VMKey VM: $ErrMessage\n");
+ NotifyAdministrator("Could not create a job to update $VMKey",
+ "A live snapshot was created for $VMKey but no job could be\n".
+ "created to update and rebuild Wine on it:\n\n".
+ "$ErrMessage\n");
+ }
+ else
+ {
+ Debug(Elapsed($Start), " Added a job to update and rebuild Wine on $VMKey\n");
+ }
+ }
}
# Set up the VM locale
Module: tools
Branch: master
Commit: dc42eb68bbf70d656fe81a5be890b0d86ec6b035
URL: https://source.winehq.org/git/tools.git/?a=commit;h=dc42eb68bbf70d656fe81a5…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Sep 26 13:36:23 2019 +0200
testbot/LibvirtTool: Set up new live snapshots with the latest TestAgentd.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 46 +++++++++++++++++++++++++++++++++++++++---
testbot/bin/WineRunReconfig.pl | 3 ++-
testbot/lib/Build/Utils.pm | 7 +++++++
3 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 936c386..37f95e9 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -365,9 +365,9 @@ sub CheckOff()
return ChangeStatus("dirty", "off", "done");
}
-sub SetupTestAgentd($$$)
+sub SetupTestAgentd($$$$)
{
- my ($VM, $Booting, $ResetStartCount) = @_;
+ my ($VM, $Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
Debug(Elapsed($Start), " Setting up the $VMKey TestAgent server\n");
LogMsg "Setting up the $VMKey TestAgent server\n";
@@ -380,6 +380,46 @@ sub SetupTestAgentd($$$)
FatalError("Could not connect to the $VMKey TestAgent: $ErrMessage\n");
}
+ # Upgrade TestAgentd
+ if ($UpgradeTestAgentd and ($VM->Type eq "win32" or $VM->Type eq "win64"))
+ {
+ Debug(Elapsed($Start), " Upgrading the $VMKey TestAgent server from $Version\n");
+ LogMsg "Upgrading the $VMKey TestAgent server from $Version\n";
+ if ($Version !~ / ([0-9]+)\.([0-9]+)$/)
+ {
+ FatalError("Unsupported TestAgent server version: $Version\n");
+ }
+ # We want 'TestAgentd --detach --show-restarts' on Windows but this was
+ # not supported before this version and changing how the server is started
+ # is too complex.
+ $Version = sprintf("%02d.%02d", $1, $2);
+ if ($Version lt "01.07")
+ {
+ FatalError("The TestAgent server is too old to be upgraded: $Version\n");
+ }
+
+ if (!$TA->Upgrade("$DataDir/latest/TestAgentd.exe"))
+ {
+ my $ErrMessage = $TA->GetLastError();
+ FatalError("Could not upgrade the $VMKey TestAgent: $ErrMessage\n");
+ }
+ # Give the server enough time to restart, thus (maybe) avoiding a timeout
+ # on the first (re)connection attempt.
+ sleep(1);
+ $Version = $TA->GetVersion();
+ if (!$Version)
+ {
+ my $ErrMessage = $TA->GetLastError();
+ FatalError("Could not connect to the new $VMKey TestAgent: $ErrMessage\n");
+ }
+ LogMsg "Upgraded the $VMKey TestAgent server to $Version\n";
+
+ # Note that the privileged TestAgent server (if any) is usually run with
+ # --set-time-only which means it cannot be upgraded since the restart RPC
+ # is blacklisted. But that also means it's unlikely to need upgrading.
+ # A side effect is that it will force TestAgentd.exe.old to stay around.
+ }
+
if ($ResetStartCount)
{
# If SetProperty() is not supported neither is --show-restarts.
@@ -516,7 +556,7 @@ sub Revert()
# Set up the TestAgent server. Note that setting the locale will require a
# reboot so reset start.count in that case.
- SetupTestAgentd($VM, $Booting, $SetLocale);
+ SetupTestAgentd($VM, $Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
if ($CreateSnapshot)
{
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 0bf417b..0a5e606 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -464,7 +464,8 @@ FatalTAError(undef, $TAError) if (defined $TAError);
if ($NewStatus eq "completed")
{
use File::Copy;
- foreach my $FileName ("../src/TestLauncher/TestLauncher32.exe",
+ foreach my $FileName ("../src/testagentd/TestAgentd.exe",
+ "../src/TestLauncher/TestLauncher32.exe",
"../src/TestLauncher/TestLauncher64.exe",
"latest/winefiles.txt",
"latest/wine-parentsrc.txt")
diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm
index 50d5735..9a45906 100644
--- a/testbot/lib/Build/Utils.pm
+++ b/testbot/lib/Build/Utils.pm
@@ -215,6 +215,9 @@ sub BuildNativeTestAgentd()
sub BuildWindowsTestAgentd()
{
+ my $WindowsTestAgentd = "$::RootDir/src/testagentd/TestAgentd.exe";
+ my $Before = GetMTime($WindowsTestAgentd);
+
InfoMsg "\nRebuilding the Windows TestAgentd\n";
my $CPUCount = GetCPUCount();
system("cd '$::RootDir/src/testagentd' && set -x && ".
@@ -225,6 +228,10 @@ sub BuildWindowsTestAgentd()
return !1;
}
+ if ($Before != GetMTime($WindowsTestAgentd))
+ {
+ LogMsg "Updated TestAgentd.exe\n";
+ }
return 1;
}
Module: tools
Branch: master
Commit: f624b582e35d21eaa01bbcf8e5a72cda3ab3d07a
URL: https://source.winehq.org/git/tools.git/?a=commit;h=f624b582e35d21eaa01bbcf…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Sep 26 13:35:46 2019 +0200
testbot/Engine: Increase VM::errors when a process dies and put it offline.
A process dying is most likely to be a TestBot bug. But increase the
VM's error count regardless and eventually put it offline. This will
have two benefits:
* If the crash is specific to that VM it will let other VMs runs.
* It will notify the administrator that the VM was put offline and
that something is wrong.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 530a2ee..b6a8998 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -360,7 +360,18 @@ sub _CheckAndClassifyVMs()
$FoundVMErrors = 1;
$VM->ChildDeadline(undef);
$VM->ChildPid(undef);
- $VM->Status("dirty");
+ my $Errors = ($VM->Errors || 0) + 1;
+ $VM->Errors($Errors);
+ if ($Errors >= $MaxVMErrors)
+ {
+ $VM->Status("offline");
+ NotifyAdministrator("The TestBot and/or the ". $VM->Name ." VM needs fixing",
+ "The ". $VM->Name ." VM got $Errors consecutive errors, the last of which is a child process crash which indicates a TestBot bug. But something may also be wrong with the VM for it to have triggered the crash so it has been put offline.\n");
+ }
+ else
+ {
+ $VM->Status("dirty");
+ }
$VM->Save();
$VM->RecordResult($Sched->{records}, "boterror process died");
$Sched->{lambvms}->{$VMKey} = 1;
Module: tools
Branch: master
Commit: 03268afd2ba530ebb95c72f3795f397386dd7abe
URL: https://source.winehq.org/git/tools.git/?a=commit;h=03268afd2ba530ebb95c72f…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Sep 26 13:35:15 2019 +0200
testbot/WineRunReconfig: Use SpecialJobs to create the WineTest job.
Also notify the administrator if that job creation fails.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunReconfig.pl | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 2e62a2e..0bf417b 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -526,10 +526,24 @@ if ($NewStatus eq 'completed')
FatalError("Could not recreate the $IdleSnapshot snapshot: $ErrMessage\n");
}
- if ($VM->Type eq "wine" and
- system("$BinDir/CheckForWinetestUpdate.pl", "--vm", $VM->Name, "--create", "winetest"))
+ if ($VM->Type eq "wine")
{
- Error("Could not create a job to run WineTest on the ". $VM->Name ." VM\n");
+ require WineTestBot::SpecialJobs;
+ $ErrMessage = WineTestBot::SpecialJobs::AddWineTestJob([$VM], $VM->Name);
+ if (defined $ErrMessage)
+ {
+ Error("Could not create a WineTest job for ". $VM->Name .": $ErrMessage\n");
+ NotifyAdministrator("Could not create a WineTest job for ". $VM->Name,
+ "Could not create a job to run WineTest on ". $VM->Name
+ ." after its update:\n\n".
+ "$ErrMessage\n\n".
+ "See the link below for more details:\n".
+ MakeSecureURL(GetTaskURL($JobId, $StepNo, $TaskNo)) ."\n");
+ }
+ else
+ {
+ Debug(Elapsed($Start), " Added a WineTest job for ". $VM->Name ."\n");
+ }
}
}