Bugs related to a test that has no failure are likely to be out of date, except if they are related to memory issues.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- winetest/build-patterns | 52 +++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 7 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index aacbb5217..e3174b231 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -1200,16 +1200,29 @@ sub write_pattern($$$)
print $html "<div class='testtext'>$test->{desc}</div>\n" if (defined $test->{desc});
- print $html "<div class='test'>\n"; - write_newmodes_line($html, $test) if (%{$test->{newmodes}}); + my $has_pattern; + if (%{$test->{newmodes}}) + { + $has_pattern = 1; + print $html "<div class='test'>\n"; + write_newmodes_line($html, $test); + } foreach my $reportdir (@sortedreports) { next if (!$pagereports->{$reportdir}); next if (!$test->{testreports}->{$reportdir}->{failed}); + if (!$has_pattern) + { + $has_pattern = 1; + print $html "<div class='test'>\n"; + } write_pattern_line($html, $test, $reportdir); } - write_commits($html, $test) if (%{$test->{commits}}); - print $html "</div>\n"; + if ($has_pattern) + { + write_commits($html, $test) if (%{$test->{commits}}); + print $html "</div>\n"; + } }
sub write_patterns_list($$$$) @@ -1290,12 +1303,20 @@ EOF old => {title => "Old failures", desc => "look like they are fixed: they had no failure in the most recent $patternbuilds builds but that may also just be a lucky streak.", testnames => []}, + oldbugs => {title => "Potentially obsolete bugs", + desc => "have related bugs but no failure whatsoever. Maybe the bugs can be closed.", + testnames => []}, + membugs => {title => "Memory bugs", + desc => "have no failures but have potential memory bugs (leaks, overflow, uninitialized data, etc). These may be out of date or may cause failures later on.", + testnames => []}, + ); foreach my $testname (sort keys %tests) { my $test = $tests{$testname}; $test->{colors} = {}; $test->{commits} = {}; + $test->{newmodes} = {};
# The regression commits may only impact the results in Wine. # Add them even if only reporting on the Windows results. @@ -1343,10 +1364,26 @@ EOF $test->{colors}->{$status} = undef; } } - next if ($last == -1); # no report had a pattern of interest next if ($testname eq "0"); + if ($last == -1 and !$subpage) + { + # This test has no failure but maybe it has bugs? + my $listid; + foreach my $bug (@{$test->{bugs}}) + { + if ($bug->{desc} =~ /(?:invalid (?:read|write)|leak|uninitialized|use after free|valgrind)/) + { + $listid ||= "membugs"; + } + else + { + $listid = "oldbugs"; + } + } + push @{$lists{$listid}->{testnames}}, $testname if ($listid); + } + next if ($last == -1); # no report had a pattern of interest
- $test->{newmodes} = {}; foreach my $status (keys %$newfailures) { next if ($oldfailures->{$status}); @@ -1399,7 +1436,8 @@ EOF <p>The patterns are grouped according to the likelyhood that they contain new failures:</p> <ul>";
- my @listids = ("summary", "recent", "newmode", "regular", "old"); + my @listids = ("summary", "recent", "newmode", "regular", "old", + "oldbugs", "membugs"); my ($prevunit, $nolist) = ("", 1); foreach my $listid (@listids) {