On Mon, Mar 03, 2008 at 02:19:23PM +0000, Smylers wrote:
> demerphq writes:
> 
> > It turned out the problem is that when the tests are root it seems to
> > be not possible to create a directory that is not writeable by root.
> 
> I think that can be reduced to: It isn't possible to create a directory
> that is not writeable by root.  The whole point of root is that as the
> super-user it can do anything!
> 
> > Im not really sure how to tackle this better than simply skipping the
> > tests as root which is what the most recent release does.
> 
> That's plausible.  It could also temporarily drop privileges to be some
> other user for running that test, but I don't know how you'd work out
> which user to do it as.

My guess would be "nobody" if that user exists, else give up.

But I agree that skipping is better, because the tests run as non-root
already prove that the module's functionality worked. Adding a lot
of complex logic to the test to swap user when running as root would
actually make the test as much a test of the user ID swapping code,
and introduce code that isn't usually tested, and generally introduce
fragility and cause false positive failures.

Nicholas Clark

Reply via email to