[tools] testbot/LogUtils: Improve handling of child process crashes.

Francois Gouget fgouget at codeweavers.com
Thu Feb 11 06:58:59 CST 2021


The "unhandled exception in child process" line also tells us the pid
of the child process so we can add it to the list of pids for the
current test unit.
ParseWineTestReport() should also count at least one failure for the
child process (in case the regular "unhandled exception" line got
lost).

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/LogUtils.pm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 9164b47ff..7a729584e 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -639,10 +639,17 @@ sub ParseWineTestReport($$$)
       $Cur->{LineFailures}++;
     }
     elsif (($Cur->{Unit} ne "" and
-            $Line =~ /($Cur->{UnitsRE}):\d+: unhandled exception [0-9a-fA-F]{8} in child process /) or
-           $Line =~ /^([_.a-z0-9]+):\d+: unhandled exception [0-9a-fA-F]{8} in child process /)
+            $Line =~ /($Cur->{UnitsRE}):\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/) or
+           $Line =~ /^([_.a-z0-9]+):\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/)
     {
-      _CheckUnit($LogInfo, $Cur, $1, "child exception");
+      my ($Unit, $Pid) = ($1, $2);
+      if ($Cur->{Units}->{$Unit})
+      {
+        # This also replaces a test summary line.
+        $Cur->{Pids}->{$Pid || 0} = 1;
+        $Cur->{SummaryFailures}++;
+      }
+      _CheckUnit($LogInfo, $Cur, $Unit, "child exception");
       $Cur->{LineFailures}++;
     }
     elsif (($Cur->{Unit} ne "" and
-- 
2.20.1




More information about the wine-devel mailing list