From b5154235bc2f968859e2f7349d462519e882fbea Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 13 Jul 2026 16:52:22 +0100 Subject: [PATCH] * test/pyhttpd/log.py (HttpdErrorLog): Add regex patterns to detect crash and sanitizer error messages in error log, and treat matching lines as errors during log checking. Assisted-by: Claude Opus 4.6 --- test/pyhttpd/log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/pyhttpd/log.py b/test/pyhttpd/log.py index 3a0727d2e3c..75d6980f0b7 100644 --- a/test/pyhttpd/log.py +++ b/test/pyhttpd/log.py @@ -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)].* (?PAH\d+): .+') def __init__(self, path: str): @@ -126,6 +128,10 @@ def get_missed(self) -> Tuple[List[str], List[str]]: 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)