Author Jason.Vas.Dias
Recipients Jason.Vas.Dias, r.david.murray
Date 2011-04-29.17:54:59
SpamBayes Score 7.88488e-05
Marked as misclassified No
Message-id <>
OK, so those and tests succeed if run
as a non-root user , because as the super-user one is allowed to
override mode 0300 ( lack of 'w' bit for owner ) on a directory ,
so some tests that check if they are unable to create files when
directory 'w' permissions would not allow this for a non-root 
user fail .

I think if users are not meant to be running the test scripts as root,
then the first thing the test suite should do is :

    if os.getuid() == 0 :
       print( "The test suite will fail if run as the super-user." )
       sys.exit(1)  # or is it os.exit ? I forget ...

But if, as I hope, you will allow the root user to run the test suite,
then please skip tests that test if a non-root user shouldn't be
allowed to do something as I did for the patch attached to issue #11956 :
       @unittest.skipUnless( ( == 'posix') and not ( os.getuid() == 0 ),
                         "test meaningful only on posix systems as non-root user")
    def test_unwritable_directory(self):
Date User Action Args
2011-04-29 17:54:59Jason.Vas.Diassetrecipients: + Jason.Vas.Dias, r.david.murray
2011-04-29 17:54:59Jason.Vas.Diassetmessageid: <>
2011-04-29 17:54:59Jason.Vas.Diaslinkissue11954 messages
2011-04-29 17:54:59Jason.Vas.Diascreate