Sure enough /tmp/mp_sess.dbm was present, and owned by apache.  I
removed the file and tested again with the same results.  In doing so
/tmp/mp_sess.dbm was re-created and owned by the user running the test.


John M.

____________________
Jim Gallacher wrote:
> John McFarlane wrote:
>> Not sure if this is helpfull, but here goes...
>>
>> To run test.py I did the following:
>>
>> Overlay: http://thinkflat.com/files/public/?d=/ebuilds/mod_python
>>
>> user# sudo emerge -a mod_python
>> user# tar zxvf mod_python-3.2.5b.tgz
>> user# cd mod_python-3.2.5b
>> user# ./configure --with-apxs=/usr/sbin/apxs2
>> user# cp /usr/lib/apache2/modules/mod_python.so src
>> user# cd test && python test.py
>>
>> After which I received the following results:
>>
>> Gentoo (current)
>> Apache 2.0.54
>> Python 2.4
>> GCC 3.3.6
>>
>> *Note: I don't have "ab" which is needed for the global_lock test?*
>> ======================================================================
>> FAIL: test_Session_Session (__main__.PerRequestTestCase)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "test.py", line 1472, in test_Session_Session
>>     self.fail("session did not set a cookie")
>> AssertionError: session did not set a cookie
> 
> Is there any chance /tmp/mp_sess.dbm already exists but with a different
> owner than the user running the tests?
> 
> Try the following in the test directory:
> 
> grep DBAccessError logs/error_log
> 
> My guess is you'll see 'Permission denied' popping up.
> 
> This makes me realize that there is a flaw in this test. The default
> location for mp_sess.db is /tmp so if a user is already running
> mod_python with sessions there will be a conflict. We should use
> 'PythonOption session_directory' to specify a location which will not
> conflict. How about test/tmp or test/var? We could stick our other
> temporary files in there as well and then do a cleanup at the successful
> completion of the tests.
> 
>> ----------------------------------------------------------------------
>> Ran 43 tests in 19.479s
>>
>> FAILED (failures=1, errors=1)
>> F  Stopping Apache...
>>      /usr/sbin/apache2 -k stop -f
>> /home/jmcfarlane/Desktop/mod_python-3.2.5b/test/conf/test.conf
>>
>> ======================================================================
>> FAIL: test_global_lock (__main__.PerInstanceTestCase)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "test.py", line 1747, in test_global_lock
>>     self.fail("global_lock is broken (too quick)")
>> AssertionError: global_lock is broken (too quick)
> 
> This failure is not a suprise since you don't have ab. We need to make
> this test conditional on ab being found or perhaps in a future release
> provide an alternative to ab in pure python.
> 
> Jim
> 

Reply via email to