FAQ
It seems like mpm_is_threaded should answer 1 for the event MPM, but it answers 0, and the test fails. The patch works around this by detecting whether it is actually prefork or not, but there may be a deeper problem here. HTH. -Mark


2014-06-23 14:02:45 Mon $ svn diff ModPerl-Registry/t/prefork.t
Index: ModPerl-Registry/t/prefork.t
===================================================================
--- ModPerl-Registry/t/prefork.t (revision 1604925)
+++ ModPerl-Registry/t/prefork.t (working copy)
@@ -8,9 +8,12 @@
  use Apache::TestConfig ();

  use Apache2::Build ();
-
  my $mpm_is_threaded = Apache2::Build->build_config->mpm_is_threaded();
+my $mpm = Apache2::Build->build_config->mpm_name();

+t_debug "# mpm_is_threaded: '$mpm_is_threaded'";
+t_debug "# mpm: '$mpm'";
+
  my %modules = (
      registry => 'ModPerl::Registry',
      perlrun => 'ModPerl::PerlRun',
@@ -21,7 +24,8 @@
  my @aliases = sort keys %modules;

  plan tests => 1*@aliases, need 'mod_alias.c',
- { "can't run under threaded MPMs" => !$mpm_is_threaded };
+ { "can't run under threaded MPMs" => !$mpm_is_threaded },
+ { "works only for prefork" => ($mpm eq 'prefork') };

  my $script = "prefork.pl";


2014-06-23 14:02:54 Mon $ cd ModPerl-Registry/; t/TEST -verbose t/prefork.t
/ntfhome/local/sbin/httpd -d /ntfhome/local/src/mod_perl2_svn/mod_perl/ModPerl-Registry/t -f /ntfhome/local/src/mod_perl2_svn/mod_perl/ModPerl-Registry/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.27 (event MPM)

waiting 90 seconds for server to start: ...
waiting 90 seconds for server to start: ok (waited 1 secs)
server localhost:8529 started
t/prefork.t ..
# # mpm_is_threaded: '0'
# # mpm: 'event'
1..0 # skipped: works only for prefork
skipped: works only for prefork
Files=1, Tests=0, 2 wallclock secs ( 0.05 usr 0.02 sys + 0.59 cusr 0.24 csys = 0.90 CPU)
Result: NOTESTS
[warning] server localhost:8529 shutdown
[warning] port 8529 still in use...
done

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedJun 23, '14 at 9:06p
activeJun 23, '14 at 9:06p
posts1
users1
websiteperl.apache.org

1 user in discussion

Mark Hedges: 1 post

People

Translate

site design / logo © 2018 Grokbase