Dumb question maybe, but I couldn't find it in the test-dev or mod_perl
mailing list archives.

How do I force use of mpm_prefork in Apache::Test, instead of inheriting
whatever configuration is set up for the server on the machine it's running
on?  In my case, the apache2 running on the server has mpm_event loaded.

I know that mod_perl2 only works right under prefork.  That's why I'm
trying to make the test suite for the module force the use of prefork, so
it will test deterministically regardless of the system Apache setup where
the test runs.

I tried overloading pre_configure() and default_run_opts() to
auotconfig_skip_module_add() for various mpms, then get the libexecdir from
the apxs data in the Apache::TestConfig object, and then call
add_config_first() to add the LoadModule and configuration to the preamble
in the generated httpd.conf.  I also set $self->{conf_opts}{MPM} =
'prefork'.

The generated httpd.conf shows that prefork should be loaded and configured.

However, the tests still spit out the warning "AH00534: apache2:
Configuration error: No MPM loaded." a bunch.  And, an inspection of
$self->{test_config}->httpd_config() after servers shows that mod_mpm_event
is still loaded.

Has anyone ever gotten an Apache::Test server to deterministically use
prefork instead of whatever it inherits from APXS?

Thanks.
Mark

Reply via email to