This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: more new test failures on Darwin


The problem is that getgid is reporting the gid for
root but s1(6) is reporting the gid for the user that
invoked sudo. Again the file created under sudo has
the owner as root but the group as the user who
invoked sudo.

Right. This is why I can't see this failure on linux (with sudo).


The attached patch should get rid of all the "sudo" failures you
reported. Can you try it and report back here?

FX
Index: gcc/testsuite/gfortran.dg/chmod_3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/chmod_3.f90	(revision 115951)
+++ gcc/testsuite/gfortran.dg/chmod_3.f90	(working copy)
@@ -20,7 +20,7 @@
   end if
 
   i = chmod (n, "a-w")
-  if (i == 0) then
+  if (i == 0 .and. getuid() /= 0) then
     if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
   end if
 
Index: gcc/testsuite/gfortran.dg/stat_1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/stat_1.f90	(revision 115951)
+++ gcc/testsuite/gfortran.dg/stat_1.f90	(working copy)
@@ -15,7 +15,7 @@
   if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0) call abort
   if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
   if (s1(5) /= getuid()) call abort
-  if (s1(6) /= getgid()) call abort
+  if (s1(6) /= getgid() .and. getgid() /= 0) call abort
   if (s1(8) < 3 .or. s1(8) > 5) call abort
 
   close (10,status="delete")
Index: gcc/testsuite/gfortran.dg/stat_2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/stat_2.f90	(revision 115951)
+++ gcc/testsuite/gfortran.dg/stat_2.f90	(working copy)
@@ -15,7 +15,7 @@
   if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0) call abort
   if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
   if (s1(5) /= getuid()) call abort
-  if (s1(6) /= getgid()) call abort
+  if (s1(6) /= getgid() .and. getgid() /= 0) call abort
   if (s1(8) < 3 .or. s1(8) > 5) call abort
 
   close (10,status="delete")
Index: gcc/testsuite/gfortran.dg/chmod_1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/chmod_1.f90	(revision 115951)
+++ gcc/testsuite/gfortran.dg/chmod_1.f90	(working copy)
@@ -20,7 +20,7 @@
   end if
 
   call chmod (n, "a-w", i)
-  if (i == 0) then
+  if (i == 0 .and. getuid() /= 0) then
     if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
   end if
 
Index: gcc/testsuite/gfortran.dg/chmod_2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/chmod_2.f90	(revision 115951)
+++ gcc/testsuite/gfortran.dg/chmod_2.f90	(working copy)
@@ -20,7 +20,7 @@
   end if
 
   i = chmod (n, "a-w")
-  if (i == 0) then
+  if (i == 0 .and. getuid() /= 0) then
     if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
   end if
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]