This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Re: more new test failures on Darwin
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Jack Howarth" <howarth at bromo dot msbb dot uc dot edu>
- Cc: fortran at gcc dot gnu dot org, Thomas dot Koenig at online dot de
- Date: Sun, 6 Aug 2006 10:08:41 +0200
- Subject: Re: Re: more new test failures on Darwin
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=tYOzN6i3HiNWoSaKQsVV8VYkOySYaBMYL8U0JLSN7JNMWWhyqqHbUyoHlfdCJfzGO1rJoxv45j6alkdRx6P0Q+NlbG/UJK2F1tXkMY4LXLyKuTYjF9wv408r34XCBmJswJn9+vyqPBrkm66WTNUaUUdDY7aipggQ71sO6Zi/DYM=
- References: <20060802010156.2A4D4110009@bromo.msbb.uc.edu>
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