Skip to content

Updated so that tests that don't use the suexec module don't load it - #954

Open
PaulLodge wants to merge 4 commits into
apache:trunkfrom
PaulLodge:suexec-test-fix
Open

PaulLodge wants to merge 4 commits into
apache:trunkfrom
PaulLodge:suexec-test-fix

Conversation

@PaulLodge

@PaulLodge PaulLodge commented Nov 6, 2026 •

Copy link
Copy Markdown

A small fix so that tests in the core that don't need the suexec module can run without error whilst the single test class adds the module before running the test. That test will also be skipped if the mod_suexec is not present in the module/ directory.


  • This PR does not report or address a security vulnerability
    (see SECURITY.md and
    https://www.apache.org/security/#reporting-a-vulnerability).
  • Code follows the httpd style guide.
  • New log messages (level debug or higher) use an empty APLOGNO() tag;
    numbers are assigned by a committer at merge time (see docs/log-message-tags/README).
  • If the change is user-visible, a changes-entries/*.txt file is included,
    following the template in README.CHANGES (not needed otherwise).
  • Test cases based on pyhttpd are included where appropriate, in the
    test/modules/xxx directory matching the modules/xxx module source,
    or test/modules/core for core server changes. On Unix, verify these
    pass locally with e.g. make check-pytest PYTEST_DIRS=test/modules/xxx.

Comment thread test/modules/core/env.py
def __init__(self, env: 'HttpdTestEnv'):
super().__init__(env=env)
self.add_source_dir(os.path.dirname(inspect.getfile(CoreTestSetup)))
self.add_modules(["cgid","include","userdir","suexec","headers"])

@covener covener Nov 6, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mod_headers is reasonable to leave in (notwithstanding that the CI failure might be showing that adding it back in didn't work?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange as the error_log offset isn't being reset and has a large number, more than the actual error_log size, so for the scan_recent() is waits and times out after 10 seconds even though the expression is present. The code seems to sidestep the conftest for some reason, so it's worthy of further investigation to ascertain what's actually happening.

@PaulLodge PaulLodge Nov 9, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the analysis it appears that the fix put in place, calls the class CoreTestEnv which in turn calls the apache restart and recreates the logs dir etc, unfortunately the log.py still has the "old" offset, which is larger than the current file, causing the scan_recent() to wait and then timeout causing the error.

Now, the question is, is the suexec actually needed? as from what I can tell it's not used any of these group of tests.

@PaulLodge
PaulLodge marked this pull request as draft November 9, 2026 11:11
@PaulLodge
PaulLodge marked this pull request as ready for review November 9, 2026 13:16
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.

2 participants