From c48ae457e73721a4383bf6431760b148d38d00cb Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Tue, 1 Dec 2026 13:20:03 +0100 Subject: [PATCH 1/2] Arrange test failing with --enable-http3=static --with-http3-quic=openssl --- test/modules/http3/env.py | 7 ++++++- test/modules/http3/test_016_cid_routing.py | 2 +- test/modules/http3/test_017_listen_address.py | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/modules/http3/env.py b/test/modules/http3/env.py index b9396dae634..376bf791991 100644 --- a/test/modules/http3/env.py +++ b/test/modules/http3/env.py @@ -81,7 +81,12 @@ def h3_ossl_backend(self) -> bool: """Whether mod_http3 runs on OpenSSL's own QUIC stack (--with-http3-quic=openssl) and not on ngtcp2, which has no 0-RTT, connection ID routing or connection migration.""" - path = os.path.join(self.LIBEXEC_DIR, "mod_http3.so") + # a module built into httpd (--enable-http3=static) is in its binary, + # and a mod_http3.so left in LIBEXEC_DIR is not the one in use + if "http3" in self.static_modules(): + path = os.path.join(self.bin_dir, "httpd") + else: + path = os.path.join(self.LIBEXEC_DIR, "mod_http3.so") try: with open(path, "rb") as fd: return b"ngtcp2" not in fd.read() diff --git a/test/modules/http3/test_016_cid_routing.py b/test/modules/http3/test_016_cid_routing.py index 6154638e536..ea24be7ead9 100644 --- a/test/modules/http3/test_016_cid_routing.py +++ b/test/modules/http3/test_016_cid_routing.py @@ -116,7 +116,7 @@ class TestCidRouting: @pytest.fixture(autouse=True, scope="class") def _class_scope(self, env): if env.h3_ossl_backend: - pytest.skip("routing by connection ID needs the ngtcp2 backend") + pytest.xfail("routing by connection ID needs the ngtcp2 backend") cpus = os.cpu_count() or 1 if cpus < 2: pytest.skip("two buckets need two cores") diff --git a/test/modules/http3/test_017_listen_address.py b/test/modules/http3/test_017_listen_address.py index 22a1c12e795..449323293e1 100644 --- a/test/modules/http3/test_017_listen_address.py +++ b/test/modules/http3/test_017_listen_address.py @@ -5,7 +5,7 @@ import pytest -from .env import H3Conf +from .env import H3Conf, known_bug # All of 127.0.0.0/8 is local on Linux, so a second loopback address shows # whether HTTP/3 answers on an address httpd was not told to listen on. @@ -106,6 +106,11 @@ def test_h3_017_02_wildcard(self, env): assert env.wait_udp_port(port) for addr in ["127.0.0.1", OTHER_ADDR]: r = get(env, port, addr) + if addr == OTHER_ADDR and env.h3_ossl_backend: + # OpenSSL QUIC sends from the address the kernel picks, not + # from the one the client sent to, so the client drops it + known_bug(r.exit_code != 0, f"OpenSSL QUIC replies to {addr} " + "from another source address") assert r.exit_code == 0, f"{addr}: {r}" assert r.response["status"] == 200 From bccdad156ed82308312a101e225d840f4c930f1e Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Tue, 1 Dec 2026 13:50:52 +0100 Subject: [PATCH 2/2] Skip test not working with ASAN builds. --- test/modules/http3/env.py | 11 +++++++++++ test/modules/http3/test_112_stream_reclaim.py | 2 ++ 2 files changed, 13 insertions(+) diff --git a/test/modules/http3/env.py b/test/modules/http3/env.py index 376bf791991..8c8b29e6c8c 100644 --- a/test/modules/http3/env.py +++ b/test/modules/http3/env.py @@ -93,6 +93,17 @@ def h3_ossl_backend(self) -> bool: except OSError: return False + @property + def built_with_asan(self) -> bool: + """Whether httpd is AddressSanitizer instrumented: its quarantine of + freed memory grows RSS by far more than anything a test measuring + memory could tell from a leak.""" + try: + with open(os.path.join(self.bin_dir, "httpd"), "rb") as fd: + return b"__asan_init" in fd.read() + except OSError: + return False + @property def h3_port(self) -> int: # the QUIC listener shares the number of the TLS port, over UDP diff --git a/test/modules/http3/test_112_stream_reclaim.py b/test/modules/http3/test_112_stream_reclaim.py index 7ff95e2fcf4..aff9fad4299 100644 --- a/test/modules/http3/test_112_stream_reclaim.py +++ b/test/modules/http3/test_112_stream_reclaim.py @@ -22,6 +22,8 @@ class TestStreamReclaim: @pytest.fixture(autouse=True, scope="class") @classmethod def _class_scope(cls, env): + if env.built_with_asan: + pytest.skip("RSS is not a measure of memory use under ASan") H3Conf(env).add_h3_vhost().install() assert env.apache_restart() == 0