svn commit: r1935937 - in httpd/httpd/branches/2.4.x: . test test/modules/http2 test/pyhttpd
[email protected] Mon, 06 Jul 2026 11:52:41 -0000
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178333876100.421665.10144633732267019820@svn03-he-fi> |
Author: jim
Date: Mon Jul 6 11:52:40 2026
New Revision: 1935937
Log:
Merge r1934891 from trunk:
test/h2: ignore AH02430 for the whole TestRfc9113 class
test_h2_203_02 intentionally triggers AH02430 (illegal response header
char). Over HTTP/2 the error is logged late during stream teardown and
can produce several lines, so the per-case ignore_recent() raced them
and they leaked into a later test's check_error_log(). Move the ignore
to an autouse class fixture (as conftest.py does for AH10400/AH00045)
and add HttpdErrorLog.remove_ignored_lognos() to restore on teardown.
Reviewed by: jim
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/test/ (props changed)
httpd/httpd/branches/2.4.x/test/modules/http2/test_203_rfc9113.py
httpd/httpd/branches/2.4.x/test/pyhttpd/log.py
Modified: httpd/httpd/branches/2.4.x/test/modules/http2/test_203_rfc9113.py
==============================================================================
--- httpd/httpd/branches/2.4.x/test/modules/http2/test_203_rfc9113.py Mon Jul 6 11:51:44 2026 (r1935936)
+++ httpd/httpd/branches/2.4.x/test/modules/http2/test_203_rfc9113.py Mon Jul 6 11:52:40 2026 (r1935937)
@@ -12,6 +12,18 @@ class TestRfc9113:
def _class_scope(self, env):
H2Conf(env).add_vhost_test1().install()
assert env.apache_restart() == 0
+ # test_h2_203_02 sends a response header with an illegal char on
+ # purpose; httpd rightly rejects it with AH02430 and RST_STREAMs the
+ # request. With HTTP/2 that error is emitted *late*, during stream
+ # teardown, and a single case can produce several AH02430 lines spread
+ # over time -- so a per-case ignore_recent() races the stragglers,
+ # which then surface in a later test's check_error_log() (the timing,
+ # and thus which MPM trips, varies with sync vs async h2 handoff).
+ # AH02430 is only ever produced here intentionally, so ignore it for
+ # the whole class; restore the prior set afterwards so it does not leak.
+ env.httpd_error_log.add_ignored_lognos(['AH02430'])
+ yield
+ env.httpd_error_log.remove_ignored_lognos(['AH02430'])
# by default, we accept leading/trailing ws in request fields
def test_h2_203_01_ws_ignore(self, env):
Modified: httpd/httpd/branches/2.4.x/test/pyhttpd/log.py
==============================================================================
--- httpd/httpd/branches/2.4.x/test/pyhttpd/log.py Mon Jul 6 11:51:44 2026 (r1935936)
+++ httpd/httpd/branches/2.4.x/test/pyhttpd/log.py Mon Jul 6 11:52:40 2026 (r1935937)
@@ -76,6 +76,10 @@ class HttpdErrorLog:
for l in lognos:
self._ignored_lognos.add(l)
+ def remove_ignored_lognos(self, lognos: List[str]):
+ for l in lognos:
+ self._ignored_lognos.discard(l)
+
def _is_ignored(self, line: str) -> bool:
if self._lookup_matches(line, self._ignored_matches):
return True