I've got failures that seem to be caused by the tests themselves, but with a bit of tweaking they pass.

FreeBSD 6.0
Apache 2.0.55 port built WITH_THREADS=1
Python 2.4.2


The error_log shows:
----------------------
[Mon Nov 14 19:38:15 2005] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.

[Mon Nov 14 19:38:15 2005] [alert] (2)No such file or directory: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive

[Mon Nov 14 19:38:15 2005] [notice] Apache/2.0.55 (FreeBSD) mod_python/3.2.5b Python/2.4.2 configured -- resuming normal operations

[Mon Nov 14 19:38:15 2005] [info] Server built: Nov 12 2005 23:05:22

[Mon Nov 14 19:38:15 2005] [debug] prefork.c(956): AcceptMutex: flock (default: flock)

[Mon Nov 14 19:38:15 2005] [alert] Child 9492 returned a Fatal error... Apache is exiting!

[Mon Nov 14 19:38:15 2005] [emerg] (2)No such file or directory: Couldn't initialize cross-process lock in child

[Mon Nov 14 19:38:15 2005] [emerg] (2)No such file or directory: Couldn't initialize cross-process lock in child
------------------------

Googling that last message comes up with a suggesting that you specify a "User" in the http config.

With the attached patch, the tests run httpd with a "User www" directive, and pass.

        Barry
--- mod_python-3.2.5b-old/test/httpdconf.py     Tue Sep 13 15:35:57 2005
+++ mod_python-3.2.5b/test/httpdconf.py Mon Nov 14 19:43:07 2005
@@ -264,6 +264,10 @@
     def __init__(self, val='Off'):
         Directive.__init__(self, self.__class__.__name__, val)
 
+class User(Directive):
+    def __init__(self, val='www'):
+        Directive.__init__(self, self.__class__.__name__, val)
+
 class VirtualHost(ContainerTag):
     def __init__(self, addr, *args):
         ContainerTag.__init__(self, self.__class__.__name__, addr, args)
--- mod_python-3.2.5b-old/test/test.py  Mon Nov 14 12:09:49 2005
+++ mod_python-3.2.5b/test/test.py      Mon Nov 14 19:56:03 2005
@@ -229,6 +229,7 @@
             IfModule("!mod_dir.c",
                      LoadModule("dir_module %s" %
                                 quoteIfSpace(os.path.join(modpath, 
"mod_dir.so")))),
+            User("www"),
             ServerRoot(SERVER_ROOT),
             ErrorLog("logs/error_log"),
             LogLevel("debug"),

Reply via email to