Francois Gouget : testbot/LogUtils: Don't include garbage in the .errors file.

Alexandre Julliard julliard at winehq.org
Mon Mar 22 16:32:42 CDT 2021


Module: tools
Branch: master
Commit: 4ddd1988c59548839c1c19e146ea213ecd0e74d3
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=4ddd1988c59548839c1c19e146ea213ecd0e74d3

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Mar 22 11:12:15 2021 +0100

testbot/LogUtils: Don't include garbage in the .errors file.

When failure lines are garbled because of a race condition or a missing
'\n' they often contain unwanted characters at the start of the line.
If included in the .errors file these prevent the line from matching
past instances of the failure (if only because of line numbers), thus
causing it to be incorrectly reported as new. So only include the
parts of the line matched by the error matching regular expression.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50491
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/LogUtils.pm    | 8 ++++----
 testbot/src/reporttest/report.testwtbs | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 7670f59..5f7046c 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -573,7 +573,7 @@ sub ParseWineTestReport($$$)
            $Line =~ /^([_a-z0-9]+)\.c:\d+:[0-9.]* Test (?:failed|succeeded inside todo block): /)
     {
       _CheckUnit($LogInfo, $Cur, $1, "failure");
-      _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+      _AddReportError($LogInfo, $Cur, $LineNo, "$&$'");
       $Cur->{LineFailures}++;
     }
     elsif (($Cur->{Unit} ne "" and
@@ -625,7 +625,7 @@ sub ParseWineTestReport($$$)
           $Cur->{Pids}->{$Pid || 0} = 1;
           $Cur->{SummaryFailures}++;
         }
-        _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+        _AddReportError($LogInfo, $Cur, $LineNo, "$&$'");
         $Cur->{LineFailures}++;
       }
     }
@@ -636,7 +636,7 @@ sub ParseWineTestReport($$$)
         # This also replaces a test summary line. The pid is unknown so use 0.
         $Cur->{Pids}->{0} = 1;
         $Cur->{SummaryFailures}++;
-        _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+        _AddReportError($LogInfo, $Cur, $LineNo, "$&$'");
         $Cur->{LineFailures}++;
       }
     }
@@ -654,7 +654,7 @@ sub ParseWineTestReport($$$)
           $Cur->{Pids}->{$Pid || 0} = 1;
           $Cur->{SummaryFailures}++;
         }
-        _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+        _AddReportError($LogInfo, $Cur, $LineNo, $&);
         $Cur->{LineFailures}++;
       }
     }
diff --git a/testbot/src/reporttest/report.testwtbs b/testbot/src/reporttest/report.testwtbs
index e198827..104c8ea 100644
--- a/testbot/src/reporttest/report.testwtbs
+++ b/testbot/src/reporttest/report.testwtbs
@@ -50,11 +50,11 @@ n 0 comboex.c:40: Test failed: A failure in the main process
 n 0 comboex.c:41: Test succeeded inside todo block: Success in the main process
 n 0 header.c:1: Test failed: Something wrong
 n 0 1234:rebar: unhandled exception c0000005 at 0040167C
-n 0 garbled0123:status: unhandled exception c0000005 at 0040167C
-n 0 status.c:33: unhandled exception c0000005 in child process 0123dead
+n 0 0123:status: unhandled exception c0000005 at 0040167C
+n 0 status.c:33: unhandled exception c0000005 in child process 0123
 n 0 1234:subclass: unhandled exception c0000005 at 0040167C
-n 0 Do not cut syslink.c:40: Test failed: Something wrong
-n 0 Do not cut syslink.c:41: Test succeeded inside todo block: Something right!
+n 0 syslink.c:40: Test failed: Something wrong
+n 0 syslink.c:41: Test succeeded inside todo block: Something right!
 n 0 Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x0054376d).
 n 0 1234:taskdialog: unhandled exception c0000005 at 0040167C
 n 0 taskdialog.c:471: unhandled exception c0000005 in child process 1234




More information about the wine-cvs mailing list