Module: tools
Branch: master
Commit: 8ac3bc8cf7f31318599909ce757aa6974e477157
URL: https://source.winehq.org/git/tools.git/?a=commit;h=8ac3bc8cf7f31318599909c…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Dec 5 13:23:19 2019 +0100
testbot/LogUtils: GetLogFileNames() should untaint the returned log names.
Otherwise the caller may get an error when trying to use them for file
operations (such as unlink).
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/LogUtils.pm | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 32bf0fa..4a17857 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -634,13 +634,21 @@ sub GetLogFileNames($;$)
foreach my $FileName (glob("'$Dir/$Glob*'"))
{
my $LogName = basename($FileName);
- if ($LogName !~ s/\.err$// and $LogName !~ /\.report$/ and
- $LogName ne $Glob) # 'log' case
+ $LogName =~ s/\.err$//;
+ next if ($Seen{$LogName});
+ if ($LogName =~ /^([a-zA-Z0-9_]+\.report)$/)
+ {
+ $LogName = $1; # untaint
+ }
+ elsif ($LogName eq $Glob) # log and old_log cases
+ {
+ $LogName = $Glob; # untaint
+ }
+ else
{
# Not a valid log filename (where does this file come from?)
next;
}
- next if ($Seen{$LogName});
$Seen{$LogName} = 1;
if ((-f "$Dir/$LogName" and !-z "$Dir/$LogName") or
Module: tools
Branch: master
Commit: 84ecff2af7c128f3fe6cdd3b9ef26ff255cc72d7
URL: https://source.winehq.org/git/tools.git/?a=commit;h=84ecff2af7c128f3fe6cdd3…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Dec 5 13:23:04 2019 +0100
testbot/WineSendLog: Errors are not new when missing reference reports.
Build logs don't have reference logs so for them every error is new.
But test reports should have reference WineTest results and if not
reporting the errors as new would cause false positives. So default
to "not new" in that case.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineSendLog.pl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index 721122e..95cc036 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -291,8 +291,11 @@ EOF
my ($NewGroups, $NewErrors, $_NewIndices) = GetNewLogErrors($RefFileName, $LogErrors->{Groups}, $LogErrors->{Errors});
if (!$NewGroups)
{
- # There was no reference log (typical of build logs)
- # so every error is new
+ # Test reports should have reference WineTest results and if not
+ # reporting the errors as new would cause false positives.
+ next if ($LogName =~ /\.report$/);
+
+ # Build logs don't have reference logs so for them every error is new.
$NewGroups = $LogErrors->{Groups};
$NewErrors = $LogErrors->{Errors};
}
Module: tools
Branch: master
Commit: dc3a53cea57cee685cb79714ed68e8a0f375f7bc
URL: https://source.winehq.org/git/tools.git/?a=commit;h=dc3a53cea57cee685cb7971…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Dec 5 13:22:16 2019 +0100
testbot/Janitor: Fix extracting the VM name from reference report filenames.
The log name part can contain underscores and uppercase letters when
testing locales.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Janitor.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index 537a0dc..c51637a 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -308,7 +308,7 @@ if (opendir(my $dh, "$DataDir/latest"))
{
next if ($Entry eq "." or $Entry eq "..");
- if ($Entry =~ /^(.*)_[a-z0-9]+\.report(?:\.err)?$/)
+ if ($Entry =~ /^([a-zA-Z0-9_]+)_(?:exe|win|wow)(?:32|64)[a-zA-Z0-9_]*\.report(?:\.err)?$/)
{
# Keep the reference WineTest reports for all VMs even if they are
# retired or scheduled for deletion.