From: Rainer Jung Date: Wed, 17 Jul 2024 22:04:01 +0000 (+0000) Subject: Skip h2 tests on prefork. X-Git-Tag: 2.4.63-candidate~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41c53fa1118a9ce9ec330b5ead350af591d5e86;p=thirdparty%2Fapache%2Fhttpd.git Skip h2 tests on prefork. Backport of r1919332 from trunk. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1919333 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/modules/tls/env.py b/test/modules/tls/env.py index 6afc472cb08..efc4f0b2473 100644 --- a/test/modules/tls/env.py +++ b/test/modules/tls/env.py @@ -55,6 +55,12 @@ class TlsTestEnv(HttpdTestEnv): CURL_SUPPORTS_TLS_1_3 = None + @classmethod + @property + def is_unsupported(cls): + mpm_module = f"mpm_{os.environ['MPM']}" if 'MPM' in os.environ else 'mpm_event' + return mpm_module == 'mpm_prefork' + @classmethod def curl_supports_tls_1_3(cls) -> bool: if cls.CURL_SUPPORTS_TLS_1_3 is None: diff --git a/test/modules/tls/test_07_alpn.py b/test/modules/tls/test_07_alpn.py index aa449104c52..6017372020a 100644 --- a/test/modules/tls/test_07_alpn.py +++ b/test/modules/tls/test_07_alpn.py @@ -4,8 +4,10 @@ from datetime import timedelta import pytest from .conf import TlsTestConf +from .env import TlsTestEnv +@pytest.mark.skipif(condition=TlsTestEnv.is_unsupported, reason="h2 not supported here") class TestAlpn: @pytest.fixture(autouse=True, scope='class') diff --git a/test/modules/tls/test_14_proxy_ssl.py b/test/modules/tls/test_14_proxy_ssl.py index f5ed445f846..81cb4f31b07 100644 --- a/test/modules/tls/test_14_proxy_ssl.py +++ b/test/modules/tls/test_14_proxy_ssl.py @@ -2,6 +2,7 @@ import re import pytest from .conf import TlsTestConf +from .env import TlsTestEnv from pyhttpd.env import HttpdTestEnv @@ -63,6 +64,7 @@ class TestProxySSL: ] ) + @pytest.mark.skipif(condition=TlsTestEnv.is_unsupported, reason="h2 not supported here") def test_tls_14_proxy_ssl_h2_get(self, env): r = env.tls_get(env.domain_b, "/proxy-h2-ssl/index.json") assert r.exit_code == 0 diff --git a/test/modules/tls/test_15_proxy_tls.py b/test/modules/tls/test_15_proxy_tls.py index e7eb10362b0..3fe6cfe4789 100644 --- a/test/modules/tls/test_15_proxy_tls.py +++ b/test/modules/tls/test_15_proxy_tls.py @@ -3,6 +3,7 @@ from datetime import timedelta import pytest from .conf import TlsTestConf +from .env import TlsTestEnv from pyhttpd.env import HttpdTestEnv @pytest.mark.skipif(condition=not HttpdTestEnv.has_shared_module("tls"), reason="no mod_tls available") @@ -62,6 +63,7 @@ class TestProxyTLS: ] ) + @pytest.mark.skipif(condition=TlsTestEnv.is_unsupported, reason="h2 not supported here") def test_tls_15_proxy_tls_h2_get(self, env): r = env.tls_get(env.domain_b, "/proxy-h2-tls/index.json") assert r.exit_code == 0 @@ -88,6 +90,7 @@ class TestProxyTLS: ("SSL_CIPHER", "TLS_CHACHA20_POLY1305_SHA256"), ("SSL_SESSION_RESUMED", "Initial"), ]) + @pytest.mark.skipif(condition=TlsTestEnv.is_unsupported, reason="h2 not supported here") def test_tls_15_proxy_tls_h2_vars(self, env, name: str, value: str): r = env.tls_get(env.domain_b, f"/proxy-h2-tls/vars.py?name={name}") assert r.exit_code == 0, r.stderr