This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, committed] Allow open_errors.f90 to pass under sudo
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 02 Aug 2007 19:21:43 -0700
- Subject: [patch, committed] Allow open_errors.f90 to pass under sudo
I committed this minor patch to allow the test to pass when run under sudo.
Index: gfortran.dg/open_errors.f90
===================================================================
--- gfortran.dg/open_errors.f90 (revision 127175)
+++ gfortran.dg/open_errors.f90 (working copy)
@@ -25,7 +25,7 @@ if (msg /= "'./' is a directory" .and. m
open(77,file=n,status="new")
i = chmod(n, "-w")
-if (i == 0) then
+if (i == 0 .and. getuid() /= 0) then
close(77, status="keep")
open(77,file=n, iomsg=msg, iostat=i, action="write")
if (i == 0) call abort()
Regards,
Jerry
2007-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/opem_errors.f90: Revise test to pass when run under sudo.