Francois Gouget : winetest/dissect: Improve the pid detection on garbled lines.
Alexandre Julliard
julliard at winehq.org
Mon Mar 15 16:58:04 CDT 2021
Module: tools
Branch: master
Commit: 6e2edfff31d52899e8455cf5388173d95adbeac4
URL: https://source.winehq.org/git/tools.git/?a=commit;h=6e2edfff31d52899e8455cf5388173d95adbeac4
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Mar 15 10:30:26 2021 +0100
winetest/dissect: Improve the pid detection on garbled lines.
The pid is always printed with a fixed width so this should be taken
into account to avoid matching too much. For instance in
'garbage1234:unit.c:...' one should match '1234', not 'e1234' which
would lead to a mismatch with the pids on other lines.
This is particularly important for the exception, summary and done
lines.
This also means the matching can be simplified a bit since we know
where the relevant part of the line starts.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
winetest/dissect | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect
index 304e9c9..919b17a 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -665,9 +665,7 @@ while ($line = <IN>) {
check_unit($l_unit, "IgnoreExceptions");
$ignore_exceptions = $l_ignore;
}
- elsif (($unit ne "" and
- $line =~ /([0-9a-f]+):($units_re):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /) or
- $line =~ /^([0-9a-f]+):([_.a-z0-9]+):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /)
+ elsif ($line =~ /([0-9a-f]{4}):([_.a-z0-9]+):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /)
{
my ($l_pid, $l_unit) = ($1, $2);
my $class = "";
@@ -699,8 +697,8 @@ while ($line = <IN>) {
add_test_line($class, escapeHTML($line));
}
elsif (($unit ne "" and
- $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/) or
- $line =~ /^()([_.a-z0-9]+)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/)
+ $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]{4}).*)$/) or
+ $line =~ /^()([_.a-z0-9]+)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]{4}).*)$/)
{
my ($pollution, $l_unit, $l_num, $l_text, $l_pid) = ($1, $2, $3, $4, $5);
my $class = "";
@@ -729,9 +727,7 @@ while ($line = <IN>) {
get_source_link($l_unit, $l_num) .
escapeHTML($l_text));
}
- elsif (($unit ne "" and
- $line =~ /([0-9a-f]+):($unit):[0-9.]* (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./) or
- $line =~ /^([0-9a-f]+):([_a-z0-9]+):[0-9.]* (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./)
+ elsif ($line =~ /([0-9a-f]{4}):([_a-z0-9]+):[0-9.]* (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./)
{
my ($l_pid, $l_unit, $l_total, $l_todo, $l_failures, $l_skipped) = ($1, $2, $3, $4, $5, $6);
@@ -754,8 +750,8 @@ while ($line = <IN>) {
}
}
elsif (($dll ne "" and
- $line =~ /(\Q$dll\E):([_a-z0-9]+):([0-9a-f]+) done \((-?\d+)\) in /) or
- $line =~ /^([_.a-z0-9-]+):([_a-z0-9]+):([0-9a-f]+) done \((-?\d+)\) in /)
+ $line =~ /(\Q$dll\E):([_a-z0-9]+):([0-9a-f]{4}) done \((-?\d+)\) in /) or
+ $line =~ /^([_.a-z0-9-]+):([_a-z0-9]+):([0-9a-f]{4}) done \((-?\d+)\) in /)
{
my ($l_dll, $l_unit, $l_pid, $l_rc) = ($1, $2, $3, $4);
More information about the wine-cvs
mailing list