Skip to content

test: load mod_proxy_ajp, mod_proxy_uwsgi and mod_proxy_fcgi as optional modules - #1101

Merged
covener merged 4 commits into
apache:trunkfrom
covener:proxy-optional-test-modules
Nov 27, 2026
Merged

covener merged 4 commits into
apache:trunkfrom
covener:proxy-optional-test-modules

Conversation

@covener

@covener covener commented Nov 27, 2026

Copy link
Copy Markdown
Member

If a module listed in ProxyTestSetup.add_modules() isn't built, setup stops with "Unable to find modules" and every test under test/modules/proxy fails. #1096 added proxy_fcgi to that list. proxy_ajp and proxy_uwsgi were already on it. The tests that use these three modules check for them with env.require() / pytest.skip(), but those checks could never run.

  • test/modules/proxy/env.py: move proxy_ajp, proxy_uwsgi and proxy_fcgi to add_optional_modules(), next to proxy_hcheck and proxy_scgi.
  • test/modules/proxy/test_03_uwsgi.py: the _proxy_uwsgi_setup fixture had no check for the module, so add one, and use env.require() in both fixtures so --strict-optional reports the missing module.
  • test/README.pytest, AGENTS.md: say when a test module belongs in add_modules() and when it belongs in add_optional_modules().

Tested on macOS with make check-pytest PYTEST_DIRS=test/modules/proxy:

  • All modules built: 75 passed.
  • With mod_proxy_{ajp,uwsgi,fcgi}.so removed from check/modules: 61 passed, 14 skipped. Before this change, every test in the package fails.
  • Same, with --strict-optional: the same 14 tests fail, naming the missing module.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PUN2EPhoNvc4rfibgy6H72

…nal modules.

A module in ProxyTestSetup.add_modules() that the build lacks stops setup
with "Unable to find modules", failing every test under test/modules/proxy,
and the env.require() checks in the tests that use these modules could
never be reached. Load them with add_optional_modules() so a build without
one skips only those tests (or fails them under --strict-optional).

* test/modules/proxy/env.py: Move proxy_ajp, proxy_uwsgi and proxy_fcgi
  to add_optional_modules().
* test/modules/proxy/test_03_uwsgi.py: Check for mod_proxy_uwsgi with
  env.require() in both class fixtures; _proxy_uwsgi_setup had no check.
* test/README.pytest, AGENTS.md: Describe when a test module belongs in
  add_modules() and when in add_optional_modules().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUN2EPhoNvc4rfibgy6H72
covener added a commit to covener/httpd that referenced this pull request Nov 27, 2026
…modules/proxy/test_03_uwsgi.py, AGENTS.md changes omitted):

test: Load mod_proxy_ajp, mod_proxy_uwsgi and mod_proxy_fcgi as optional modules.

A module in ProxyTestSetup.add_modules() that the build lacks stops setup
with "Unable to find modules", failing every test under test/modules/proxy,
and the env.require() checks in the tests that use these modules could
never be reached. Load them with add_optional_modules() so a build without
one skips only those tests (or fails them under --strict-optional).

* test/modules/proxy/env.py: Move proxy_ajp, proxy_uwsgi and proxy_fcgi
  to add_optional_modules().
* test/modules/proxy/test_03_uwsgi.py: Check for mod_proxy_uwsgi with
  env.require() in the setup fixture, which had no check.
* test/README.pytest: Describe when a test module belongs in
  add_modules() and when in add_optional_modules().

(2.4.x's test_03_uwsgi.py has a single module-level setup fixture, so the
check goes there; 2.4.x has no AGENTS.md.)
test/ is copied to 2.4.x as it is, so mark the tests from apache#1096 that fail
on a 2.4.x without the change, expecting the backport (apache#1097) in 2.4.72.
Marks follow a run against unfixed 2.4.x: a test that hangs the server,
crashes it or leaves errors in the error log is skipped, one that fails
cleanly is an expected failure, and one that passes is left unmarked.

* test/modules/filters/test_010_substitute_empty_match.py: Skip the cases
  that loop forever or log "Line too long"; anchor_nonempty fails cleanly;
  lookbehind passes already.
* test/modules/metadata/test_006_expr_backref.py: Skip the class: its
  Header edit* lines crash every request without r1915271.
* test/modules/proxy/test_13_fcgi_setenvif.py: Only the short-circuit test
  fails without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUN2ETFf8d5srUT51exsTS
covener added a commit to covener/httpd that referenced this pull request Nov 27, 2026
test: Mark the tests of the regex backreference changes not_backported.

test/ is copied to 2.4.x as it is, so mark the tests from apache#1096 that fail
on a 2.4.x without the change, expecting the backport (apache#1097) in 2.4.72.
Marks follow a run against unfixed 2.4.x: a test that hangs the server,
crashes it or leaves errors in the error log is skipped, one that fails
cleanly is an expected failure, and one that passes is left unmarked.

* test/modules/filters/test_010_substitute_empty_match.py: Skip the cases
  that loop forever or log "Line too long"; anchor_nonempty fails cleanly;
  lookbehind passes already.
* test/modules/metadata/test_006_expr_backref.py: Skip the class: its
  Header edit* lines crash every request without r1915271.
* test/modules/proxy/test_13_fcgi_setenvif.py: Only the short-circuit test
  fails without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUN2ETFf8d5srUT51exsTS
(cherry picked from commit 4468c24)
Changes are made by pull request now, so the examples showing svn
revisions led to marks waiting for a revision that never comes. Show
"gh-NNNN" instead, and say that the "rNNNNNNN" names in older marks are
svn revisions from before the move to git.

* test/pyhttpd/backport.py, test/README.pytest: Use apachegh-1096 in the
  examples, and explain the older revision names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUN2ETFf8d5srUT51exsTS
covener added a commit to covener/httpd that referenced this pull request Nov 27, 2026
test: Name the pull request in the not_backported examples.

Changes are made by pull request now, so the examples showing svn
revisions led to marks waiting for a revision that never comes. Show
"gh-NNNN" instead, and say that the "rNNNNNNN" names in older marks are
svn revisions from before the move to git.

* test/pyhttpd/backport.py, test/README.pytest: Use apachegh-1096 in the
  examples, and explain the older revision names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUN2ETFf8d5srUT51exsTS
(cherry picked from commit c1185a1)
@covener
covener merged commit 352229d into apache:trunk Nov 27, 2026
46 of 47 checks passed
@covener
covener deleted the proxy-optional-test-modules branch November 27, 2026 19:44
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.

1 participant