summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-12 01:03:29 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-12 01:03:29 +0000
commitc79940ebeadbfee89c2f9bee8439beacf74376f9 (patch)
treec181625b768c8456f7bd76c805a96268a17994b1
parentb21487d3e6a03694f9d759f4167cec0e92a54820 (diff)
downloadppe42-gcc-c79940ebeadbfee89c2f9bee8439beacf74376f9.tar.gz
ppe42-gcc-c79940ebeadbfee89c2f9bee8439beacf74376f9.zip
* gfortran.dg/stat_1.f90: Make test pass when run under sudo.
* gfortran.dg/stat_2.f90: Likewise. * gfortran.dg/chmod_1.f90: Likewise. * gfortran.dg/chmod_2.f90: Likewise. * gfortran.dg/chmod_3.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116097 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/chmod_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/stat_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/stat_2.f902
6 files changed, 13 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 002761d20d1..d7cb8c87886 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.dg/stat_1.f90: Make test pass when run under sudo.
+ * gfortran.dg/stat_2.f90: Likewise.
+ * gfortran.dg/chmod_1.f90: Likewise.
+ * gfortran.dg/chmod_2.f90: Likewise.
+ * gfortran.dg/chmod_3.f90: Likewise.
+
2006-08-11 David Edelsohn <edelsohn@gnu.org>
* gfortran.dg/direct_io_6.f90: Skip on *-*-aix*.
diff --git a/gcc/testsuite/gfortran.dg/chmod_1.f90 b/gcc/testsuite/gfortran.dg/chmod_1.f90
index e9ea27f1b1d..2f0af8cc2db 100644
--- a/gcc/testsuite/gfortran.dg/chmod_1.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_1.f90
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/chmod_2.f90 b/gcc/testsuite/gfortran.dg/chmod_2.f90
index e413fcad8f3..3dc445e1cb7 100644
--- a/gcc/testsuite/gfortran.dg/chmod_2.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_2.f90
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/chmod_3.f90 b/gcc/testsuite/gfortran.dg/chmod_3.f90
index 4ea34eb8cf4..cfeba67dd42 100644
--- a/gcc/testsuite/gfortran.dg/chmod_3.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_3.f90
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/stat_1.f90 b/gcc/testsuite/gfortran.dg/stat_1.f90
index c8e38815400..5325634246f 100644
--- a/gcc/testsuite/gfortran.dg/stat_1.f90
+++ b/gcc/testsuite/gfortran.dg/stat_1.f90
@@ -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")
diff --git a/gcc/testsuite/gfortran.dg/stat_2.f90 b/gcc/testsuite/gfortran.dg/stat_2.f90
index 7ebd057239f..4bd17cabf0d 100644
--- a/gcc/testsuite/gfortran.dg/stat_2.f90
+++ b/gcc/testsuite/gfortran.dg/stat_2.f90
@@ -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")
OpenPOWER on IntegriCloud