summaryrefslogtreecommitdiffstats
path: root/test/modules/http2
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-02-25 14:17:11 +0100
committerStefan Eissing <icing@apache.org>2022-02-25 14:17:11 +0100
commitef648ab01d3610a87b35b95448b189a7585df200 (patch)
treea7b7ca30906896ad29982a312a9b34c4de645e21 /test/modules/http2
parent *) test: assume that modules which do not appear in our list of DSO_MODULES (diff)
downloadapache2-ef648ab01d3610a87b35b95448b189a7585df200.tar.xz
apache2-ef648ab01d3610a87b35b95448b189a7585df200.zip
*) test: check for the mpm module used and disable http2 tests
for prefork. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898417 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/modules/http2')
-rw-r--r--test/modules/http2/env.py5
-rw-r--r--test/modules/http2/test_001_httpd_alive.py3
-rw-r--r--test/modules/http2/test_002_curl_basics.py3
-rw-r--r--test/modules/http2/test_003_get.py3
-rw-r--r--test/modules/http2/test_004_post.py3
-rw-r--r--test/modules/http2/test_005_files.py3
-rw-r--r--test/modules/http2/test_006_assets.py3
-rw-r--r--test/modules/http2/test_100_conn_reuse.py3
-rw-r--r--test/modules/http2/test_101_ssl_reneg.py1
-rw-r--r--test/modules/http2/test_102_require.py3
-rw-r--r--test/modules/http2/test_103_upgrade.py3
-rw-r--r--test/modules/http2/test_104_padding.py3
-rw-r--r--test/modules/http2/test_105_timeout.py3
-rw-r--r--test/modules/http2/test_106_shutdown.py3
-rw-r--r--test/modules/http2/test_200_header_invalid.py3
-rw-r--r--test/modules/http2/test_201_header_conditional.py3
-rw-r--r--test/modules/http2/test_202_trailer.py3
-rw-r--r--test/modules/http2/test_300_interim.py3
-rw-r--r--test/modules/http2/test_400_push.py3
-rw-r--r--test/modules/http2/test_401_early_hints.py3
-rw-r--r--test/modules/http2/test_500_proxy.py3
-rw-r--r--test/modules/http2/test_501_proxy_serverheader.py3
-rw-r--r--test/modules/http2/test_502_proxy_port.py3
-rw-r--r--test/modules/http2/test_600_h2proxy.py3
-rw-r--r--test/modules/http2/test_700_load_get.py1
-rw-r--r--test/modules/http2/test_710_load_post_static.py3
-rw-r--r--test/modules/http2/test_711_load_post_cgi.py3
-rw-r--r--test/modules/http2/test_712_buffering.py3
28 files changed, 57 insertions, 25 deletions
diff --git a/test/modules/http2/env.py b/test/modules/http2/env.py
index 8b2d54230c..a65ac98caa 100644
--- a/test/modules/http2/env.py
+++ b/test/modules/http2/env.py
@@ -57,6 +57,11 @@ class H2TestSetup(HttpdTestSetup):
class H2TestEnv(HttpdTestEnv):
+ @classmethod
+ def is_unsupported(cls):
+ mpm_module = f"mpm_{os.environ['MPM']}" if 'MPM' in os.environ else 'mpm_event'
+ return mpm_module in ['mpm_prefork']
+
def __init__(self, pytestconfig=None):
super().__init__(pytestconfig=pytestconfig)
self.add_httpd_conf([
diff --git a/test/modules/http2/test_001_httpd_alive.py b/test/modules/http2/test_001_httpd_alive.py
index 557d17a453..b5708d2813 100644
--- a/test/modules/http2/test_001_httpd_alive.py
+++ b/test/modules/http2/test_001_httpd_alive.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestBasicAlive:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_002_curl_basics.py b/test/modules/http2/test_002_curl_basics.py
index bb03bd84f3..91be772114 100644
--- a/test/modules/http2/test_002_curl_basics.py
+++ b/test/modules/http2/test_002_curl_basics.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestCurlBasics:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_003_get.py b/test/modules/http2/test_003_get.py
index ccef11fbde..f38c745b39 100644
--- a/test/modules/http2/test_003_get.py
+++ b/test/modules/http2/test_003_get.py
@@ -1,9 +1,10 @@
import re
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestGet:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_004_post.py b/test/modules/http2/test_004_post.py
index 1a52623a9a..b4f4e443d5 100644
--- a/test/modules/http2/test_004_post.py
+++ b/test/modules/http2/test_004_post.py
@@ -8,9 +8,10 @@ import sys
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestPost:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_005_files.py b/test/modules/http2/test_005_files.py
index 3f0a63ac11..e7618362c5 100644
--- a/test/modules/http2/test_005_files.py
+++ b/test/modules/http2/test_005_files.py
@@ -1,7 +1,7 @@
import os
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
def mk_text_file(fpath: str, lines: int):
@@ -15,6 +15,7 @@ def mk_text_file(fpath: str, lines: int):
fd.write("\n")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestFiles:
URI_PATHS = []
diff --git a/test/modules/http2/test_006_assets.py b/test/modules/http2/test_006_assets.py
index 7a0222e0ac..778314eda0 100644
--- a/test/modules/http2/test_006_assets.py
+++ b/test/modules/http2/test_006_assets.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestAssets:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_100_conn_reuse.py b/test/modules/http2/test_100_conn_reuse.py
index 7df7a605cc..e0b663190a 100644
--- a/test/modules/http2/test_100_conn_reuse.py
+++ b/test/modules/http2/test_100_conn_reuse.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestConnReuse:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_101_ssl_reneg.py b/test/modules/http2/test_101_ssl_reneg.py
index 1ca23d4a5d..66f2638a7b 100644
--- a/test/modules/http2/test_101_ssl_reneg.py
+++ b/test/modules/http2/test_101_ssl_reneg.py
@@ -4,6 +4,7 @@ import pytest
from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
@pytest.mark.skipif(H2TestEnv.get_ssl_module() != "mod_ssl", reason="only for mod_ssl")
class TestSslRenegotiation:
diff --git a/test/modules/http2/test_102_require.py b/test/modules/http2/test_102_require.py
index ed83a981a2..b7e4eaef6e 100644
--- a/test/modules/http2/test_102_require.py
+++ b/test/modules/http2/test_102_require.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestRequire:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_103_upgrade.py b/test/modules/http2/test_103_upgrade.py
index 92f9e36498..2fa7d1d68a 100644
--- a/test/modules/http2/test_103_upgrade.py
+++ b/test/modules/http2/test_103_upgrade.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestUpgrade:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_104_padding.py b/test/modules/http2/test_104_padding.py
index 60915fab3e..7b874ed9ce 100644
--- a/test/modules/http2/test_104_padding.py
+++ b/test/modules/http2/test_104_padding.py
@@ -1,6 +1,6 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
def frame_padding(payload, padbits):
@@ -8,6 +8,7 @@ def frame_padding(payload, padbits):
return ((payload + 9 + mask) & ~mask) - (payload + 9)
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestPadding:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_105_timeout.py b/test/modules/http2/test_105_timeout.py
index 24133ae52c..d8dada90c4 100644
--- a/test/modules/http2/test_105_timeout.py
+++ b/test/modules/http2/test_105_timeout.py
@@ -3,10 +3,11 @@ import time
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
from pyhttpd.curl import CurlPiper
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestTimeout:
# Check that base servers 'Timeout' setting is observed on SSL handshake
diff --git a/test/modules/http2/test_106_shutdown.py b/test/modules/http2/test_106_shutdown.py
index 21036ed28e..b119292b72 100644
--- a/test/modules/http2/test_106_shutdown.py
+++ b/test/modules/http2/test_106_shutdown.py
@@ -7,10 +7,11 @@ from threading import Thread
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
from pyhttpd.result import ExecResult
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestShutdown:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_200_header_invalid.py b/test/modules/http2/test_200_header_invalid.py
index c1ac2dea32..b09a5a6ecb 100644
--- a/test/modules/http2/test_200_header_invalid.py
+++ b/test/modules/http2/test_200_header_invalid.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestInvalidHeaders:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_201_header_conditional.py b/test/modules/http2/test_201_header_conditional.py
index be52400a2b..f1032683bf 100644
--- a/test/modules/http2/test_201_header_conditional.py
+++ b/test/modules/http2/test_201_header_conditional.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestConditionalHeaders:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_202_trailer.py b/test/modules/http2/test_202_trailer.py
index ae3d8970b3..fce46c1574 100644
--- a/test/modules/http2/test_202_trailer.py
+++ b/test/modules/http2/test_202_trailer.py
@@ -1,7 +1,7 @@
import os
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
def setup_data(env):
@@ -13,6 +13,7 @@ def setup_data(env):
# The trailer tests depend on "nghttp" as no other client seems to be able to send those
# rare things.
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestTrailers:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_300_interim.py b/test/modules/http2/test_300_interim.py
index 0ca674a015..774ab88a06 100644
--- a/test/modules/http2/test_300_interim.py
+++ b/test/modules/http2/test_300_interim.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestInterimResponses:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_400_push.py b/test/modules/http2/test_400_push.py
index 1d7410031d..9c61608d87 100644
--- a/test/modules/http2/test_400_push.py
+++ b/test/modules/http2/test_400_push.py
@@ -1,10 +1,11 @@
import os
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
# The push tests depend on "nghttp"
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestPush:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_401_early_hints.py b/test/modules/http2/test_401_early_hints.py
index fb099e5d60..1b851d3080 100644
--- a/test/modules/http2/test_401_early_hints.py
+++ b/test/modules/http2/test_401_early_hints.py
@@ -1,9 +1,10 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
# The push tests depend on "nghttp"
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestEarlyHints:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_500_proxy.py b/test/modules/http2/test_500_proxy.py
index 7240c39b27..5eec052263 100644
--- a/test/modules/http2/test_500_proxy.py
+++ b/test/modules/http2/test_500_proxy.py
@@ -3,9 +3,10 @@ import os
import re
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestProxy:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_501_proxy_serverheader.py b/test/modules/http2/test_501_proxy_serverheader.py
index d78db1a6d8..0d7c188900 100644
--- a/test/modules/http2/test_501_proxy_serverheader.py
+++ b/test/modules/http2/test_501_proxy_serverheader.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestProxyServerHeader:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_502_proxy_port.py b/test/modules/http2/test_502_proxy_port.py
index 472f625ad5..f6c6db156f 100644
--- a/test/modules/http2/test_502_proxy_port.py
+++ b/test/modules/http2/test_502_proxy_port.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestProxyPort:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_600_h2proxy.py b/test/modules/http2/test_600_h2proxy.py
index 1c0b7e96fb..d27143d22c 100644
--- a/test/modules/http2/test_600_h2proxy.py
+++ b/test/modules/http2/test_600_h2proxy.py
@@ -1,8 +1,9 @@
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestH2Proxy:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_700_load_get.py b/test/modules/http2/test_700_load_get.py
index 77b85f2fc8..d1121a6065 100644
--- a/test/modules/http2/test_700_load_get.py
+++ b/test/modules/http2/test_700_load_get.py
@@ -3,6 +3,7 @@ import pytest
from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
@pytest.mark.skipif(not H2TestEnv().h2load_is_at_least('1.41.0'),
reason="h2load misses --connect-to option")
class TestLoadGet:
diff --git a/test/modules/http2/test_710_load_post_static.py b/test/modules/http2/test_710_load_post_static.py
index 5e3ac1c882..9a0e1e250b 100644
--- a/test/modules/http2/test_710_load_post_static.py
+++ b/test/modules/http2/test_710_load_post_static.py
@@ -1,9 +1,10 @@
import pytest
import os
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestLoadPostStatic:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_711_load_post_cgi.py b/test/modules/http2/test_711_load_post_cgi.py
index dca9ce5f21..81bc8e10bc 100644
--- a/test/modules/http2/test_711_load_post_cgi.py
+++ b/test/modules/http2/test_711_load_post_cgi.py
@@ -1,9 +1,10 @@
import pytest
import os
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestLoadCgi:
@pytest.fixture(autouse=True, scope='class')
diff --git a/test/modules/http2/test_712_buffering.py b/test/modules/http2/test_712_buffering.py
index 219314816c..9eb26890ad 100644
--- a/test/modules/http2/test_712_buffering.py
+++ b/test/modules/http2/test_712_buffering.py
@@ -2,10 +2,11 @@ from datetime import timedelta
import pytest
-from .env import H2Conf
+from .env import H2Conf, H2TestEnv
from pyhttpd.curl import CurlPiper
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestBuffering:
@pytest.fixture(autouse=True, scope='class')