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 + + * 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 * 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")