aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-10-26 10:22:15 +0000
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>2015-10-26 10:22:15 +0000
commit013a83cc0252d9cc8cce994000d7a44d8e40555b (patch)
tree1f740556a2191dc216438badf12761de3cede877 /gcc
parente96b7045d6d56a31c05bcdf387e38c0d64584ef2 (diff)
downloadgcc-013a83cc0252d9cc8cce994000d7a44d8e40555b.zip
gcc-013a83cc0252d9cc8cce994000d7a44d8e40555b.tar.gz
gcc-013a83cc0252d9cc8cce994000d7a44d8e40555b.tar.bz2
Fix race on temp file in gfortran streamio_*.f90 tests
* gfortran.dg/streamio_4.f90, gfortran.dg/streamio_5.f90, * gfortran.dg/streamio_6.f90, gfortran.dg/streamio_7.f90, * gfortran.dg/streamio_10.f90, gfortran.dg/streamio_12.f90: Add suffix to the temporary filename to make it unique per testcase. From-SVN: r229315
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_4.f904
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_5.f904
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_7.f902
7 files changed, 15 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 45dc22e..c7cdd98 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-26 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+
+ * gfortran.dg/streamio_4.f90, gfortran.dg/streamio_5.f90,
+ * gfortran.dg/streamio_6.f90, gfortran.dg/streamio_7.f90,
+ * gfortran.dg/streamio_10.f90, gfortran.dg/streamio_12.f90: Add
+ suffix to the temporary filename to make it unique per testcase.
+
2015-10-26 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/torture/builtin-minmax-1.c: Don't run at -O0.
diff --git a/gcc/testsuite/gfortran.dg/streamio_10.f90 b/gcc/testsuite/gfortran.dg/streamio_10.f90
index b0c573e..9874405 100644
--- a/gcc/testsuite/gfortran.dg/streamio_10.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_10.f90
@@ -8,7 +8,7 @@ program stream_io_10
integer(kind=8) :: thepos
a = (/ 1, 2, 3, 4 /)
b = a
- open(10, file="teststream", access="stream")
+ open(10, file="teststream_streamio_10", access="stream")
write(10) a
inquire(10, pos=thepos)
if (thepos.ne.17) call abort()
diff --git a/gcc/testsuite/gfortran.dg/streamio_12.f90 b/gcc/testsuite/gfortran.dg/streamio_12.f90
index 0b0d678..f90d685 100644
--- a/gcc/testsuite/gfortran.dg/streamio_12.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_12.f90
@@ -6,7 +6,7 @@ program streamtest
character(1) :: tchar
integer :: i,j,k
real(kind=4), dimension(100,100) :: anarray
- open(10, file="teststream", access="stream", form="unformatted")
+ open(10, file="teststream_streamio_12", access="stream", form="unformatted")
anarray = 3.14159
write(10) anarray
write(10, pos=1) ! This is a way to position an unformatted file
diff --git a/gcc/testsuite/gfortran.dg/streamio_4.f90 b/gcc/testsuite/gfortran.dg/streamio_4.f90
index ce638a4..0ed3d2e 100644
--- a/gcc/testsuite/gfortran.dg/streamio_4.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_4.f90
@@ -9,7 +9,7 @@ program streamtest
integer :: i,j,k
integer, parameter :: lines = 5231
- open(10, file="teststream", access="stream", form="formatted")
+ open(10, file="teststream_streamio_4", access="stream", form="formatted")
do i=1,lines
do j=0,9
@@ -19,7 +19,7 @@ program streamtest
close(10)
- open(10, file="teststream", access="stream",&
+ open(10, file="teststream_streamio_4", access="stream",&
&form="formatted", position="append")
do i=1,lines
do j=0,9
diff --git a/gcc/testsuite/gfortran.dg/streamio_5.f90 b/gcc/testsuite/gfortran.dg/streamio_5.f90
index 6fdf707..fe7c21c 100644
--- a/gcc/testsuite/gfortran.dg/streamio_5.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_5.f90
@@ -7,7 +7,7 @@ program streamtest5
character(1) :: tchar
integer :: i,j,k
- open(10, file="teststream", access="stream", form="unformatted")
+ open(10, file="teststream_streamio_5", access="stream", form="unformatted")
do i=1,1229
do j=0,9
@@ -18,7 +18,7 @@ program streamtest5
close(10)
- open(10, file="teststream", access="stream", form="unformatted")
+ open(10, file="teststream_streamio_5", access="stream", form="unformatted")
do i=1,1229
do j=0,9
diff --git a/gcc/testsuite/gfortran.dg/streamio_6.f90 b/gcc/testsuite/gfortran.dg/streamio_6.f90
index 3857667..dc20889 100644
--- a/gcc/testsuite/gfortran.dg/streamio_6.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_6.f90
@@ -15,7 +15,7 @@ program streamio_6
& 72, 81, 59, 24, 37, 43, 21, 54, 68, 31, 19, 79, 63, 41,&
& 42, 12, 10, 62, 43, 9, 30, 9, 54, 35, 4, 5, 55, 3, 94 /
- open(unit=15,file="teststream",access="stream",form="unformatted")
+ open(unit=15,file="teststream_streamio_6",access="stream",form="unformatted")
do i=1,100
k = a(i)
write(unit=15, pos=k) achar(k)
diff --git a/gcc/testsuite/gfortran.dg/streamio_7.f90 b/gcc/testsuite/gfortran.dg/streamio_7.f90
index 7a7b277..4d6e4a0 100644
--- a/gcc/testsuite/gfortran.dg/streamio_7.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_7.f90
@@ -7,7 +7,7 @@ program streamtest
character(1) :: tchar
integer :: i,j,k
real(kind=4), dimension(100,100) :: anarray
- open(10, file="teststream", access="stream", form="unformatted")
+ open(10, file="teststream_streamio_7", access="stream", form="unformatted")
anarray = 3.14159
write(10) anarray
anarray = 0.0