Any exception occurring while IgnoreExceptions=1 is expected and should be ignored.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
This brings dissect in line with this Wine patch: tests: Add ignore_exceptions(). https://www.winehq.org/pipermail/wine-devel/2021-February/180823.html
The TestBot also needs a similar update but the situation is a bit more complex there because of GetReportLineCategory() vs. ParseWineTestReport() conflicts.
winetest/dissect | 71 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 23 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index d2ef10d42..4341999c3 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -448,7 +448,7 @@ my $unitsize = 0; my %units; my ($failures, $todo, $skipped) = (0, 0, 0); my ($s_failures, $s_todo, $s_skipped, $s_total) = (0, 0, 0, 0); -my (%pids, $rc, $summary, $broken); +my (%pids, $rc, $summary, $broken, $ignore_exceptions); my ($extra_failures, $failed_units) = (0, 0);
sub get_source_link($$) @@ -583,7 +583,7 @@ sub close_test_unit($) $unitsize = 0; $failures = $todo = $skipped = 0; $s_failures = $s_todo = $s_skipped = $s_total = 0; - $extra_failures = $broken = 0; + $extra_failures = $broken = $ignore_exceptions = 0; $rc = $summary = undef; %pids = (); } @@ -661,45 +661,70 @@ while ($line = <IN>) { # Don't complain and don't count misplaced skips $skipped++ if ($units{$l_unit}); } + elsif (($unit ne "" and + $line =~ /^(.*?)($units_re).c:(\d+): (IgnoreExceptions=([01]).*)$/) or + $line =~ /^()([_.a-z0-9]+).c:(\d+): (IgnoreExceptions=([01]).*)$/) + { + my ($pollution, $l_unit, $l_num, $l_text, $l_ignore) = ($1, $2, $3, $4, $5); + add_test_line("", escapeHTML($pollution) . + get_source_link($l_unit, $l_num) .": ". + escapeHTML($l_text)); + $ignore_exceptions = $l_ignore; + } elsif (($unit ne "" and $line =~ /([0-9a-f]+):($units_re): unhandled exception [0-9a-fA-F]{8} at /) or $line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at /) { my ($l_pid, $l_unit) = ($1, $2); - if ($units{$l_unit}) + my $class = ""; + if (!$ignore_exceptions) { - # This also replaces a test summary line. - $pids{$l_pid || 0} = 1; - $s_failures++; + $class = "failed"; + if ($units{$l_unit}) + { + # This also replaces a test summary line. + $pids{$l_pid || 0} = 1; + $s_failures++; + } + check_unit($l_unit, "unhandled exception"); + $failures++; } - add_test_line("failed", escapeHTML($line)); - check_unit($l_unit, "unhandled exception"); - $failures++; + add_test_line($class, escapeHTML($line)); } elsif ($line =~ /Unhandled exception: .* in .* code /) { - # This also replaces a test summary line. The pid is unknown so use 0. - $pids{0} = 1; - $s_failures++; - $failures++; - add_test_line("failed", escapeHTML($line)); + my $class = ""; + if (!$ignore_exceptions) + { + $class = "failed"; + # This also replaces a test summary line. + $pids{0} = 1; # the pid is unknown so use 0 + $s_failures++; + $failures++; + } + add_test_line($class, escapeHTML($line)); } elsif (($unit ne "" and $line =~ /^(.*?)($units_re).c:(\d+): (unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/) or $line =~ /^()([_.a-z0-9]+).c:(\d+): (unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/) { my ($pollution, $l_unit, $l_num, $l_text, $l_pid) = ($1, $2, $3, $4, $5); - if ($units{$l_unit}) + my $class = ""; + if (!$ignore_exceptions) { - # This also replaces a test summary line. - $pids{$l_pid || 0} = 1; - $s_failures++; + $class = "failed"; + if ($units{$l_unit}) + { + # This also replaces a test summary line. + $pids{$l_pid || 0} = 1; + $s_failures++; + } + check_unit($l_unit, "child exception"); + $failures++; } - add_test_line("failed", escapeHTML($pollution) . - get_source_link($l_unit, $l_num) .": ". - escapeHTML($l_text)); - check_unit($l_unit, "child exception"); - $failures++; + add_test_line($class, escapeHTML($pollution) . + get_source_link($l_unit, $l_num) .": ". + escapeHTML($l_text)); } elsif (($unit ne "" and $line =~ /^(.*?)($units_re).c:(\d+): (.*)$/) or