Module: tools
Branch: master
Commit: e070e093de5fde11616266df45933224d5d21252
URL: https://source.winehq.org/git/tools.git/?a=commit;h=e070e093de5fde11616266d…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Feb 8 23:43:05 2022 +0100
testbot/LibvirtTool: Include the VM name in error messages.
Multiple VMs may be reverted at the same time (either on the same VM
host or on separate hosts) so this is needed to know which VM the error
is about.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index b572d15..ae21834 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -132,7 +132,7 @@ if (!defined $Usage)
$VM = CreateVMs()->GetItem($VMKey);
if (!defined $VM)
{
- Error "VM $VMKey does not exist\n";
+ Error "The $VMKey VM does not exist\n";
$Usage = 2;
}
}
@@ -300,7 +300,7 @@ sub ShutDown()
my $PTA = GetPrivilegedTA($VM->GetAgent());
if (!$PTA->Run($Cmd, 0))
{
- Error "Could not run @$Cmd: ". $PTA->GetLastError() ."\n";
+ Error "Could not run @$Cmd on $VMKey: ". $PTA->GetLastError() ."\n";
$Success = 0;
}
else
@@ -468,14 +468,14 @@ sub SetupTestAgentd($$$)
LogMsg "Upgrading the $VMKey TestAgent server from $Version\n";
if ($Version !~ / ([0-9]+)\.([0-9]+)$/)
{
- FatalError("Unsupported TestAgent server version: $Version\n");
+ FatalError("Unsupported TestAgent server version on $VMKey: $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.
if (!$TA->HasMinVersion(1, 7))
{
- FatalError("The TestAgent server is too old to be upgraded: $Version\n");
+ FatalError("The $VMKey TestAgent server is too old to be upgraded: $Version\n");
}
if (!$TA->Upgrade("$DataDir/latest/TestAgentd.exe"))
@@ -505,10 +505,10 @@ sub SetupTestAgentd($$$)
# HTTPS certificates), but also for the build (if the time moves forward
# during the build some ccache versions will return a compilation error).
my $PTA = GetPrivilegedTA($TA);
- FatalError("Cannot set the VM system time\n") if (!$PTA);
+ FatalError("Cannot set the $VMKey VM system time\n") if (!$PTA);
if (!$PTA->SetTime())
{
- FatalError("Setting the VM system time failed: ". $PTA->GetLastError() ."\n");
+ FatalError("Setting the $VMKey VM system time failed: ". $PTA->GetLastError() ."\n");
}
if ($Booting and $VM->Type eq "wine")
@@ -517,16 +517,16 @@ sub SetupTestAgentd($$$)
Debug(Elapsed($Start), " Waiting for the X session\n");
LogMsg "Waiting for the $VMKey X session\n";
my $Pid = $TA->Run(["sh", "-c", "while ! xset -display :0.0 q >/dev/null; do sleep 1; done"], 0);
- FatalError("Could not check for the X session on $VMKey\n") if (!$Pid);
+ FatalError("Could not check for the $VMKey X session\n") if (!$Pid);
if (!defined $TA->Wait($Pid, $SleepAfterBoot))
{
my $ErrMessage = $TA->GetLastError();
if ($ErrMessage =~ /timed out waiting for the child process/)
{
- FatalError("Timed out waiting for the X session\n");
+ FatalError("Timed out waiting for the $VMKey X session\n");
}
- FatalError("An error occurred while waiting for the X session: $ErrMessage\n");
+ FatalError("An error occurred while waiting for the $VMKey X session: $ErrMessage\n");
}
}
@@ -543,7 +543,7 @@ sub SetupTestAgentd($$$)
my $Count = $TA->GetProperties("start.count");
if (defined $Count and $Count > 1)
{
- FatalError("The VM has been rebooted too many times: start.count=$Count > 1");
+ FatalError("$VMKey has been rebooted too many times: start.count=$Count > 1");
}
}
$PTA->Disconnect();
@@ -573,7 +573,7 @@ sub Revert()
{
if (!$Debug and $VM->Status ne "reverting")
{
- Error("The VM is not ready to be reverted (". $VM->Status .")\n");
+ Error("$VMKey is not ready to be reverted (". $VM->Status .")\n");
return 1;
}
$CurrentStatus = "reverting";
Module: tools
Branch: master
Commit: 769aa02afbc0f223376d984c1fe979b4827ee40a
URL: https://source.winehq.org/git/tools.git/?a=commit;h=769aa02afbc0f223376d984…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Feb 8 23:43:24 2022 +0100
testbot/LibvirtTool: Revert() does not need its own VM object.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 51ed8e7..b572d15 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -446,9 +446,9 @@ sub CheckOff()
return ChangeStatus("dirty", "off", "done");
}
-sub SetupTestAgentd($$$$)
+sub SetupTestAgentd($$$)
{
- my ($VM, $Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
+ my ($Booting, $UpgradeTestAgentd, $ResetStartCount) = @_;
Debug(Elapsed($Start), " Setting up the $VMKey TestAgent server\n");
LogMsg "Setting up the $VMKey TestAgent server\n";
@@ -571,7 +571,6 @@ sub CreateSnapshot($$)
sub Revert()
{
- my $VM = CreateVMs()->GetItem($VMKey);
if (!$Debug and $VM->Status ne "reverting")
{
Error("The VM is not ready to be reverted (". $VM->Status .")\n");
@@ -647,7 +646,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, ($CreateSnapshot or $SetLocale), $SetLocale);
+ SetupTestAgentd($Booting, ($CreateSnapshot or $SetLocale), $SetLocale);
if ($CreateSnapshot)
{