[distcc] Patch to fix ModeBits_Case

Niklaus Giger niklaus.giger at gmx.ch
Mon Jan 9 15:05:40 GMT 2006


Under Cygwin on my Novell Netware drive, where files
created with umask 0 have not all permissions flags set.
$ umask 0 && echo xxx >tmp.tmp && ls -l tmp.tmp
-rw-r--r--  1 NG Kein 4 Jan  9 16:03 tmp.tmp

Under these cirumstances the following patch fixes the

--- orig/test/testdistcc.py
+++ mod/test/testdistcc.py
@@ -1054,9 +1054,10 @@
 class ModeBits_Case(CompileHello_Case):
     """Check distcc obeys umask"""
     def runtest(self):
+        self.runcmd("umask 0; echo dummy >testtmp.modebits")
+        modebits =  S_IMODE(os.stat("testtmp.modebits")[ST_MODE])
         self.runcmd("umask 0; distcc " + _gcc + " -c testtmp.c")
-        self.assert_equal(S_IMODE(os.stat("testtmp.o")[ST_MODE]), 0666)
+        self.assert_equal(S_IMODE(os.stat("testtmp.o")[ST_MODE]), modebits)

 class CheckRoot_Case(comfychair.TestCase):
     """Stub case that checks this is run by root.  Not used by default."""

The patch was tested under Cygwin (local harddisk and Novell Netware drive)
and on a GNU/Debian Linux x86 system.

Best regards 

Niklaus Giger

Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

More information about the distcc mailing list