]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* test/pyhttpd/log.py (HttpdErrorLog): Add regex patterns to detect
authorJoe Orton <jorton@apache.org>
Tue, 14 Jul 2026 09:25:34 +0000 (09:25 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 14 Jul 2026 09:25:34 +0000 (09:25 +0000)
  crash and sanitizer error messages in error log, and treat matching
  lines as errors during log checking.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
GitHub: closes #684

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936130 13f79535-47bb-0310-9956-ffa450edef68

test/pyhttpd/log.py

index 3a0727d2e3c7dab6dc7531b634f06a6f3f0e5871..75d6980f0b7efdea904ca60fd507b7040ec32244 100644 (file)
@@ -13,6 +13,8 @@ class HttpdErrorLog:
 
     RE_ERRLOG_WARN = re.compile(r'.*\[[^:]+:warn].*')
     RE_ERRLOG_ERROR = re.compile(r'.*\[[^:]+:error].*')
+    RE_ERRLOG_CRASH = re.compile(r'.*\bexit signal (?:Segmentation fault|Abort(ed)?|Bus error)\b.*')
+    RE_ERRLOG_ASAN = re.compile(r'.*==\d+==ERROR: (?:Address|Memory|Leak|Thread)Sanitizer:.*')
     RE_APLOGNO = re.compile(r'.*\[[^:]+:(error|warn)].* (?P<aplogno>AH\d+): .+')
 
     def __init__(self, path: str):
@@ -126,6 +128,10 @@ class HttpdErrorLog:
                         continue
                     if line in self._caught_matches:
                         continue
+                    if self.RE_ERRLOG_CRASH.match(line) or \
+                            self.RE_ERRLOG_ASAN.match(line):
+                        errors.append(line)
+                        continue
                     m = self.RE_ERRLOG_WARN.match(line)
                     if m and line not in self._caught_warnings:
                         warnings.append(line)