Skip to content

[2.4.x] Merge changes to tests (sync with trunk) - #1161

Merged
notroj merged 24 commits into
apache:2.4.xfrom
notroj:2.4.x-tests-sync
Dec 4, 2026
Merged

notroj merged 24 commits into
apache:2.4.xfrom
notroj:2.4.x-tests-sync

Conversation

@notroj

@notroj notroj commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Merge 6f23dbd, ff9f2cd, d545f13, 4efb44f, f48aba8, eb42f09, 86245b0, 459e11e, 15181bb, a56d39a, e539392, 4c0de9e, 4e32ddc, a3cb166, 8434951, f3bb083, fc91138, 0956b89, 4aae8b7, 816d033, 3b04bc1, 6ebce6c, 440c287, 366aa81 from trunk:

Switch des3 encryption of keys to aes256. Switch generation of
DSA certificates to ECDSA certificates. Remove dependency on the
legacy provider in OpenSSL.

Ported from perl test suite

mod_session checks the session expiry time before decoding the session, causing session expiry to be ignored for mod_session_cookie sessions. (#802)

  • mod_session checks the session expiry time before decoding the session, causing session expiry to be ignored for mod_session_cookie sessions.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

  • Updated test naming

Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

Add TLS 1.3 cipher and version tests (#803)

Added TLS 1.3 cipher and version tests

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Corrected file serial number and test naming (#1002)

Add mod_brotli compression tests (#840)

  • Add mod_brotli compression tests

  • Refactored so that the tests are now in the correct module

  • Removed build-win.bat updates for brotli, moved to another PR


Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

The tests verify RewriteCond/RewriteRule-based redirects: (#800)

  • The tests verify RewriteCond/RewriteRule-based redirects:

Rewrite escape sequence test

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Refactor the mod_rewite tests to the correct directory (#1021)

  • test/modules/ssl/test_005_vhost_compat.py (TestVhostCompatPolicy):
    New parametrized test of each SSLVHostSNIPolicy, and the default,
    against each class of vhost difference, gated on the server version.
    (TestVhostCompatAuthonly, TestVhostCompatAuthonlyAuth): Remove,
    covered by the above.

  • test/pyhttpd/env.py (HttpdTestEnv.has_directive): Remove; it only
    saw the directives of statically linked modules.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

Fix the warnings pytest reports for the test suites:

  • test/modules//test_.py, test/modules/arch/linux/test_*.py: Make
    class-scoped fixtures class methods.

  • test/modules/http2/test_800_websockets.py
    (TestWebSockets.ws_check_alive, TestWebSockets._mkpath,
    TestWebSockets._rmrf),
    test/modules/md/test_801_stapling.py (TestStapling.configure_httpd):
    Make static methods.

  • test/modules/http2/test_108_goaway.py
    (TestGoaway.test_h2_108_01_idle_timeout): Don't use an empty
    usefixtures() mark as the no-op decorator.

  • test/pytest_suite/tests/t/modules/test_proxy_beacon_input.py:
    Pass lists to parametrize.

  • test/pytest_suite/tests/t/apache/test_http_strict.py: Send "@"
    rather than "@" in the userinfo request, as the Perl original did.

  • test/pytest_suite/tests/t/modules/test_access.py: Drop invalid
    escape from docstring.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

Add forward proxy long hostname tests (#845)

  • Add forward proxy long hostname tests

  • Updated test and file naming


Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

Add mod_cache_disk tests (#841)

Cache tests: create CacheRoot dir, remove conflicting Cache-Control header, add CacheIgnoreNoLastMod, add cache cleanup between tests

Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

  • test/modules/aaa/test_016_authn_socache.py: New test.
    (TestAuthnSocache.test_authn_socache_173_files_share_directory_context,
    TestAuthnSocache.test_authn_socache_174_files_context): Based on
    tests by Hafiar <289389248+0xABCD01 users.noreply.github.com> in
    GitHub PR mod_authn_socache: bind cache keys to the authentication domain #930.

  • test/modules/aaa/env.py (AAATestSetup.init): Load
    mod_authn_socache.
    (AAATestEnv.init): Log mod_authn_socache.
    (AAATestEnv.write_basic_pwfile, AAATestEnv.write_digest_pwfile,
    AAATestEnv.preserved_test_conf): New.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

Add mod_substitute, ext_filter, SSI, and deflate tests (#815)

  • Add mod_substitute, ext_filter, SSI, and deflate tests

  • Refactored test and file naming to follow source code pattern


Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

Consolidate the uwsgi tests from test_003 and test_005 into a single file (#786)

Check that a malformed Digest header does not leak anything (#1094)

aaa test: Check a malformed Digest header does not leak anything

Two checks not covered by the existing suite: no valgrind malloc-fill
bytes may appear in the error log, and the challenge must stay printable
ASCII, when a malformed Digest Authorization header is processed.

Co-authored-by: Claude Code noreply@anthropic.com

  • test/modules/core/test_013_expr_proto_version.py: New test suite.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

  • test/modules/core/test_013_expr_proto_version.py: Mark as backported
    in 2.4.72.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

test: Make mod_brotli and mod_deflate optional (#1123)

A build without zlib or libbrotli lacks mod_deflate or mod_brotli, and
listing them in add_modules() (deflate in the base set for every
package) stopped setup with "Unable to find modules", failing every
test in the package.

  • test/pyhttpd/env.py (HttpdTestSetup): Load deflate as an optional
    module rather than a required one.
  • test/modules/filters/env.py: Likewise for brotli and deflate, and only
    set a LogLevel for brotli and proxy_html when they are there, since a
    LogLevel for an unloaded module is a config error.
  • test/modules/filters/test_007_brotli_compression.py,
    test/modules/filters/test_009_mod_deflate.py,
    test/modules/http2/test_201_header_conditional.py,
    test/modules/http3/test_100_get.py: Skip when the module is missing.

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

cache test: Cover an empty Content-Type and add mod_cache_socache tests (#1095)

mod_cache_socache had no test coverage, and an empty Content-Type
response through mod_cache_disk was untested

Co-authored-by: Claude Code noreply@anthropic.com

Add DeflateAlterETag and mod_sed large input filter tests (#1102)

  • Add DeflateAlterETag and mod_sed large input filter tests
  • test_010_deflate_alter_etag: verifies that DeflateAlterETag AddSuffix,
    NoChange, and Remove modes handle ETags correctly when mod_deflate
    compression is applied.

  • test_011_sed_large_input: verifies that mod_sed handles a large (8 MB)
    request body through InputSed without crashing.

  • Removed unneeded assert


Co-authored-by: Claude Code noreply@anthropic.com

Metadata test: Cover malformed PROXY protocol headers (#1134)

metadata test: Cover malformed PROXY protocol headers

Oversized v1 lines are refused, a PROXY v2
header whose address length does not match the family is refused
(regression test for r1936357, which landed without one), and LOCAL
or UNSPEC commands with no address block are handled without reading
past the header.

Co-authored-by: Claude Code noreply@anthropic.com

mod_md: Add regression test for requests without a Host header (#1144)

Assisted-by: Claude Code noreply@anthropic.com

http2 test: Cover empty header values, client cancellation, throttled download (#1131)

TestEmptyHeaderValues class in test_200_header_invalid.py (sending the
empty values with curl -H "X;" and asserting their arrival via
hecho.py), a client cancellation test in test_105_timeout.py, and a
throttled download in test_008_ranges.py next to the existing
--limit-rate use.

Co-authored-by: Claude Code noreply@anthropic.com

session test: Cover a cookie-name header override and session_crypto padding (#1153)

Renumber to 003/004 behind trunk session module and follow its
conventions (htdocs/test1/cgi, add_vhost_test1, classmethod
fixtures). A request header named after the session cookie must not
override the session data, and forged session_crypto cookies with
manipulated padding must be rejected.

Co-authored-by: Claude Code noreply@anthropic.com

Notes:

🤖 Generated with Claude Code

minfrin and others added 24 commits December 4, 2026 14:43
DSA certificates to ECDSA certificates. Remove dependency on the
legacy provider in OpenSSL.

Ported from perl test suite

(cherry picked from commit 6f23dbd)
…env.py):

mod_session checks the session expiry time before decoding the session, causing session expiry to be ignored for mod_session_cookie sessions. (apache#802)

* mod_session checks the session expiry time before decoding the session, causing session expiry to be ignored for mod_session_cookie sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Updated test naming

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit ff9f2cd)
Added TLS 1.3 cipher and version tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit d545f13)
…env.py):

Add mod_brotli compression tests (apache#840)

* Add mod_brotli compression tests

* Refactored so that the tests are now in the correct module

* Removed build-win.bat updates for brotli, moved to another PR

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit f48aba8)
* The tests verify RewriteCond/RewriteRule-based redirects:
  - www.domain -> non-www domain (strip www prefix)
  - non-www domain -> www.domain (prepend www prefix)

Rewrite escape sequence test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit eb42f09)
  New parametrized test of each SSLVHostSNIPolicy, and the default,
  against each class of vhost difference, gated on the server version.
  (TestVhostCompatAuthonly, TestVhostCompatAuthonlyAuth): Remove,
  covered by the above.

* test/pyhttpd/env.py (HttpdTestEnv.has_directive): Remove; it only
  saw the directives of statically linked modules.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit 459e11e)
…py and files not on 2.4.x omitted):

Fix the warnings pytest reports for the test suites:

* test/modules/*/test_*.py, test/modules/arch/linux/test_*.py: Make
  class-scoped fixtures class methods.

* test/modules/http2/test_800_websockets.py
  (TestWebSockets.ws_check_alive, TestWebSockets._mkpath,
  TestWebSockets._rmrf),
  test/modules/md/test_801_stapling.py (TestStapling.configure_httpd):
  Make static methods.

* test/pytest_suite/tests/t/modules/test_proxy_beacon_input.py:
  Pass lists to parametrize.

* test/pytest_suite/tests/t/apache/test_http_strict.py: Send "@"
  rather than "\@" in the userinfo request, as the Perl original did.

* test/pytest_suite/tests/t/modules/test_access.py: Drop invalid
  escape from docstring.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit 15181bb)
* Add forward proxy long hostname tests

* Updated test and file naming

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit a56d39a)
Cache tests: create CacheRoot dir, remove conflicting Cache-Control header, add CacheIgnoreNoLastMod, add cache cleanup between tests

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit e539392)
…py):

* test/modules/aaa/test_016_authn_socache.py: New test.
  (TestAuthnSocache.test_authn_socache_173_files_share_directory_context,
  TestAuthnSocache.test_authn_socache_174_files_context): Based on
  tests by Hafiar <289389248+0xABCD01 users.noreply.github.com> in
  GitHub PR apache#930.

* test/modules/aaa/env.py (AAATestSetup.__init__): Load
  mod_authn_socache.
  (AAATestEnv.__init__): Log mod_authn_socache.
  (AAATestEnv.write_basic_pwfile, AAATestEnv.write_digest_pwfile,
  AAATestEnv.preserved_test_conf): New.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

(cherry picked from commit 4c0de9e)
…env.py):

Add mod_substitute, ext_filter, SSI, and deflate tests (apache#815)

* Add mod_substitute, ext_filter, SSI, and deflate tests

* Refactored test and file naming to follow source code pattern

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 4e32ddc)
…st_03_uwsgi.py):

Consolidate the uwsgi tests from test_003 and test_005 into a single file (apache#786)
(cherry picked from commit a3cb166)
)

aaa test: Check a malformed Digest header does not leak anything

Two checks not covered by the existing suite: no valgrind malloc-fill
bytes may appear in the error log, and the challenge must stay printable
ASCII, when a malformed Digest Authorization header is processed.

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 8434951)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f3bb083)
  in 2.4.72.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit fc91138)
…ttp3 changes omitted, conflicts resolved in test/modules/filters/env.py):

test: Make mod_brotli and mod_deflate optional (apache#1123)

A build without zlib or libbrotli lacks mod_deflate or mod_brotli, and
listing them in add_modules() (deflate in the base set for every
package) stopped setup with "Unable to find modules", failing every
test in the package.

* test/modules/filters/env.py: Load brotli and deflate as optional
  modules, and only
  set a LogLevel for brotli and proxy_html when they are there, since a
  LogLevel for an unloaded module is a config error.
* test/modules/filters/test_007_brotli_compression.py,
  test/modules/filters/test_009_mod_deflate.py: Skip when the module
  is missing.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0956b89)
…ts (apache#1095)

mod_cache_socache had no test coverage, and an empty Content-Type
response through mod_cache_disk was untested

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 4aae8b7)
* Add DeflateAlterETag and mod_sed large input filter tests

- test_010_deflate_alter_etag: verifies that DeflateAlterETag AddSuffix,
  NoChange, and Remove modes handle ETags correctly when mod_deflate
  compression is applied.

- test_011_sed_large_input: verifies that mod_sed handles a large (8 MB)
  request body through InputSed without crashing.

- Removed unneeded assert

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 816d033)
metadata test: Cover malformed PROXY protocol headers

Oversized v1 lines are refused, a PROXY v2
header whose address length does not match the family is refused
(regression test for r1936357, which landed without one), and LOCAL
or UNSPEC commands with no address block are handled without reading
past the header.

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 3b04bc1)
…e#1144)

Assisted-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 6ebce6c)
… download (apache#1131)

TestEmptyHeaderValues class in test_200_header_invalid.py (sending the
empty values with curl -H "X;" and asserting their arrival via
hecho.py), a client cancellation test in test_105_timeout.py, and a
throttled download in test_008_ranges.py next to the existing
--limit-rate use.

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 440c287)
…padding (apache#1153)

Renumber to 003/004 behind trunk session module and follow its
conventions (htdocs/test1/cgi, add_vhost_test1, classmethod
fixtures).  A request header named after the session cookie must not
override the session data, and forged session_crypto cookies with
manipulated padding must be rejected.

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 366aa81)
@notroj
notroj merged commit 150c33a into apache:2.4.x Dec 4, 2026
69 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants