public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38956]  New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin
@ 2009-01-24  3:05 billingd at gcc dot gnu dot org
  2009-01-24  3:06 ` [Bug fortran/38956] " billingd at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-01-24  3:05 UTC (permalink / raw)
  To: gcc-bugs

Test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin.  The part of the test
that fails is:

  call chmod (n, "a-w", i
  if (i == 0 .and. getuid() /= 0) then
    if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
  end if

n = "foobar_file", and after the test we have

$ ls -l foobar_file
-r-xr-xr-x 1 DABilling Domain_Users 0 Jan 24 13:58 foobar_file

so it appears thet the chmod function works.


-- 
           Summary: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: billingd at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
@ 2009-01-24  3:06 ` billingd at gcc dot gnu dot org
  2009-01-24  7:41 ` billingd at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-01-24  3:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from billingd at gcc dot gnu dot org  2009-01-24 03:06 -------
This is with cygwin-1.7.


-- 

billingd at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |billingd at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-24 03:06:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
  2009-01-24  3:06 ` [Bug fortran/38956] " billingd at gcc dot gnu dot org
@ 2009-01-24  7:41 ` billingd at gcc dot gnu dot org
  2009-01-29 22:09 ` billingd at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-01-24  7:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from billingd at gcc dot gnu dot org  2009-01-24 07:41 -------
This looks like a problem with the access function on cygwin-1.7

$ touch foobar_file
$ chmod a-w foobar_file

$ cat test_access.c
#include <stdio.h>
#include <unistd.h>
int main (void) {
  char *file="foobar_file";
  int m = W_OK;
  printf("access = %d\n",access(file,m));
}

$ touch foobar_file
$ chmod a-w foobar_file

Under cygwin-1.5
$ ./test_access
access = -1

Under cygwin-1.7 
$  ./test_access.exe
access = -1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
  2009-01-24  3:06 ` [Bug fortran/38956] " billingd at gcc dot gnu dot org
  2009-01-24  7:41 ` billingd at gcc dot gnu dot org
@ 2009-01-29 22:09 ` billingd at gcc dot gnu dot org
  2009-01-29 22:15 ` [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 " billingd at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-01-29 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from billingd at gcc dot gnu dot org  2009-01-29 22:09 -------
I asked about this on the cygwin list.

http://cygwin.com/ml/cygwin/2009-01/msg00718.html

On Jan 24 18:40, David Billinghurst wrote:
> I am having a problem with the access() function in cygwin-1.7.
>
> Under cygwin-1.5
> $ ./test_access
> access = -1
>
> Under cygwin-1.7
> $  ./test_access.exe
> access = -1

The reply was:

I assume you mean "access = 0" under 1.7.  If that's what you see, the
test probably works as designed.  You're running the test under an
administrative account.  Admin accounts have always the right to write,
same as under Linux.  

 ... and my account has Local Administrator rights.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-01-29 22:09 ` billingd at gcc dot gnu dot org
@ 2009-01-29 22:15 ` billingd at gcc dot gnu dot org
  2009-01-30 10:01 ` bonzini at gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-01-29 22:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from billingd at gcc dot gnu dot org  2009-01-29 22:14 -------
Tests gfortran.dg/chmod_2.f90 and gfortran.dg/chmod_3.f90 also fail.

There is also some discussion at
http://gcc.gnu.org/ml/fortran/2009-01/msg00353.html

In each case, the failure is due to the test

  i = chmod (n, "a-w")
  if (i == 0 .and. getuid() /= 0) then
    if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
  end if

The problem is that users with Administrator rights can always
write to files - similar to root on unix - but it is not easy to test for this.

I will prepare a patch that moves the parts that fail to a new test that is
UNSUPPORTED on cygwin.


-- 

billingd at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|test gfortran.dg/chmod_1.f90|tests
                   |fails on i686-pc-cygwin     |gfortran.dg/chmod_{1,2,3}.f9
                   |                            |0 fails on i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-01-29 22:15 ` [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 " billingd at gcc dot gnu dot org
@ 2009-01-30 10:01 ` bonzini at gnu dot org
  2009-05-10  1:15 ` billingd at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bonzini at gnu dot org @ 2009-01-30 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bonzini at gnu dot org  2009-01-30 10:01 -------
The posted patch seems wrong, since the test is testing chmod you should use
stat to check the result.  


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-01-30 10:01 ` bonzini at gnu dot org
@ 2009-05-10  1:15 ` billingd at gcc dot gnu dot org
  2009-05-10  3:36 ` billingd at gcc dot gnu dot org
  2009-05-10  3:38 ` billingd at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-10  1:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from billingd at gcc dot gnu dot org  2009-05-10 01:15 -------
Subject: Bug 38956

Author: billingd
Date: Sun May 10 01:14:50 2009
New Revision: 147326

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147326
Log:
2009-04-10  David Billinghurst <billingd@gcc.gnu.org>

        PR fortran/38956
        * gfortran.dg/chmod_1.f90: Don't run on *-*-cygwin*.
        * gfortran.dg/chmod_2.f90: Likewise.
        * gfortran.dg/chmod_3.f90: Likewise.
        * gfortran.dg/open_errors.f90: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/chmod_1.f90
    trunk/gcc/testsuite/gfortran.dg/chmod_2.f90
    trunk/gcc/testsuite/gfortran.dg/chmod_3.f90
    trunk/gcc/testsuite/gfortran.dg/open_errors.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-05-10  1:15 ` billingd at gcc dot gnu dot org
@ 2009-05-10  3:36 ` billingd at gcc dot gnu dot org
  2009-05-10  3:38 ` billingd at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-10  3:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from billingd at gcc dot gnu dot org  2009-05-10 03:36 -------
Subject: Bug 38956

Author: billingd
Date: Sun May 10 03:35:53 2009
New Revision: 147327

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147327
Log:
2009-04-10  David Billinghurst <billingd@gcc.gnu.org>

        PR fortran/38956
        * gfortran.dg/chmod_1.f90: Don't run on *-*-cygwin*.
        * gfortran.dg/chmod_2.f90: Likewise.
        * gfortran.dg/chmod_3.f90: Likewise.
        * gfortran.dg/open_errors.f90: Likewise.

Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/chmod_1.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/chmod_2.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/chmod_3.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/open_errors.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 fails on i686-pc-cygwin
  2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-05-10  3:36 ` billingd at gcc dot gnu dot org
@ 2009-05-10  3:38 ` billingd at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: billingd at gcc dot gnu dot org @ 2009-05-10  3:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from billingd at gcc dot gnu dot org  2009-05-10 03:38 -------
Fixed on trunk and 4.4 branch.


-- 

billingd at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38956


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-10  3:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24  3:05 [Bug fortran/38956] New: test gfortran.dg/chmod_1.f90 fails on i686-pc-cygwin billingd at gcc dot gnu dot org
2009-01-24  3:06 ` [Bug fortran/38956] " billingd at gcc dot gnu dot org
2009-01-24  7:41 ` billingd at gcc dot gnu dot org
2009-01-29 22:09 ` billingd at gcc dot gnu dot org
2009-01-29 22:15 ` [Bug fortran/38956] tests gfortran.dg/chmod_{1,2,3}.f90 " billingd at gcc dot gnu dot org
2009-01-30 10:01 ` bonzini at gnu dot org
2009-05-10  1:15 ` billingd at gcc dot gnu dot org
2009-05-10  3:36 ` billingd at gcc dot gnu dot org
2009-05-10  3:38 ` billingd at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).