]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Skip h2 tests on prefork.
authorRainer Jung <rjung@apache.org>
Wed, 17 Jul 2024 22:04:01 +0000 (22:04 +0000)
committerRainer Jung <rjung@apache.org>
Wed, 17 Jul 2024 22:04:01 +0000 (22:04 +0000)
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

test/modules/tls/env.py
test/modules/tls/test_07_alpn.py
test/modules/tls/test_14_proxy_ssl.py
test/modules/tls/test_15_proxy_tls.py

index 6afc472cb082fe7047f892b76929d10c6f6f1fad..efc4f0b24739f006277bac8d2adccef74488e92e 100644 (file)
@@ -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:
index aa449104c52b26ac5a220d876ff5a05459117c93..6017372020af9772f5818fa2ea6d1dcec06d6c11 100644 (file)
@@ -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')
index f5ed445f846d8a36281d2be266d4c9921928bb6d..81cb4f31b074697a2e1c53baa6542426cc176e51 100644 (file)
@@ -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
index e7eb10362b02d07fcade190aa0a4c097c8518de9..3fe6cfe4789cc1f85c7eede946ecc13108fd0629 100644 (file)
@@ -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