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: howarth at bromo dot msbb dot uc dot edu (Jack Howarth)
- To: fxcoudert at gmail dot com, 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: Tue, 1 Aug 2006 21:01:56 -0400 (EDT)
- Subject: Re: Re: more new test failures on Darwin
FX,
Looking at stat_1.f90, another test that fails
under sudo, I believe I see the problem with that test.
The failing line in that test is...
if (s1(6) /= getgid()) call abort
which if I replace with...
if (s1(6) /= getgid()) write(*,*) s1(6), getgid()
...produces the output...
[Jack-Howarths-Computer:~] howarth% sudo ./a.out
501 0
for the file...
Jack-Howarths-Computer:~] howarth% ls -ln testfile
-rw-r--r-- 1 0 501 5 Aug 1 20:49 testfile
compared to the file produced without the sudo...
[Jack-Howarths-Computer:~] howarth% ls -ln testfile
-rw-r--r-- 1 501 501 5 Aug 1 20:52 testfile
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.
Jack