public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] Fix potential race conditions in gfortran tests
@ 2015-10-16  8:10 Christophe Lyon
  2015-10-18 14:36 ` Mikael Morin
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe Lyon @ 2015-10-16  8:10 UTC (permalink / raw)
  To: gcc-patches, Maxim Kuvyrkov

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

Hi,

We have noticed a few random failures in gfortran tests in our validations.

Maxim investigated some of them and noticed a possible race condition
in the streamio tests, for which he'll post a patch.

I looked for other similar cases (checking which files are unlinked
several times during 'make check'), and noticed that a few other cases
might read/write/delete the same file concurrently.

The proposed fix is to use different names for the different testcases.

I ran make check -jX on various ARM/AArch64 configuration with no regression.

OK?

Christophe.

[-- Attachment #2: fix-race.chl.txt --]
[-- Type: text/plain, Size: 870 bytes --]

2015-10-16  Christophe Lyon  <christophe.lyon@linaro.org>

	* gfortran.dg/chmod_1.f90: Add suffix to the temporary filename to
	make it unique per testcase.
	* gfortran.dg/chmod_2.f90: Likewise.
	* gfortran.dg/chmod_3.f90: Likewise.
	* gfortran.dg/direct_io_8.f90: Likewise.
	* gfortran.dg/f2003_inquire_1.f03: Likewise.
	* gfortran.dg/f2003_io_1.f03: Likewise.
	* gfortran.dg/f2003_io_2.f03: Likewise.
	* gfortran.dg/f2003_io_8.f03: Likewise.
	* gfortran.dg/inquire_size.f90: Likewise.
	* gfortran.dg/namelist_66.f90: Likewise.
	* gfortran.dg/namelist_82.f90: Likewise.
	* gfortran.dg/namelist_87.f90: Likewise.
	* gfortran.dg/open_negative_unit_1.f90: Likewise.
	* gfortran.dg/open_new.f90: Likewise.
	* gfortran.dg/stat_1.f90: Likewise.
	* gfortran.dg/stat_2.f90: Likewise.
	* gfortran.dg/streamio_15.f90: Likewise.
	* gfortran.dg/unf_read_corrupted_1.f90: Likewise.

[-- Attachment #3: fix-race.patch.txt --]
[-- Type: text/plain, Size: 11480 bytes --]

diff --git a/gcc/testsuite/gfortran.dg/chmod_1.f90 b/gcc/testsuite/gfortran.dg/chmod_1.f90
index 07760cf..452b333 100644
--- a/gcc/testsuite/gfortran.dg/chmod_1.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_1.f90
@@ -2,7 +2,7 @@
 ! { dg-options "-std=gnu" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
-  character(len=*), parameter :: n = "foobar_file"
+  character(len=*), parameter :: n = "foobar_file_chmod_1"
   integer :: i
 
   open (10,file=n)
diff --git a/gcc/testsuite/gfortran.dg/chmod_2.f90 b/gcc/testsuite/gfortran.dg/chmod_2.f90
index 3e5ed61..68ff17d 100644
--- a/gcc/testsuite/gfortran.dg/chmod_2.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_2.f90
@@ -2,7 +2,7 @@
 ! { dg-options "-std=gnu" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
-  character(len=*), parameter :: n = "foobar_file"
+  character(len=*), parameter :: n = "foobar_file_chmod_2"
   integer :: i
 
   open (10,file=n)
diff --git a/gcc/testsuite/gfortran.dg/chmod_3.f90 b/gcc/testsuite/gfortran.dg/chmod_3.f90
index 9e92eca..5df7528 100644
--- a/gcc/testsuite/gfortran.dg/chmod_3.f90
+++ b/gcc/testsuite/gfortran.dg/chmod_3.f90
@@ -2,7 +2,7 @@
 ! { dg-options "-std=gnu -fdefault-integer-8" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
-  character(len=*), parameter :: n = "foobar_file"
+  character(len=*), parameter :: n = "foobar_file_chmod_3"
   integer :: i
 
   open (10,file=n)
diff --git a/gcc/testsuite/gfortran.dg/direct_io_8.f90 b/gcc/testsuite/gfortran.dg/direct_io_8.f90
index 5e384a1..87a8a6b 100644
--- a/gcc/testsuite/gfortran.dg/direct_io_8.f90
+++ b/gcc/testsuite/gfortran.dg/direct_io_8.f90
@@ -7,7 +7,7 @@ program main
   i=44
   ir = -42
 
-  open(11,file="foo.dat")
+  open(11,file="foo_direct_io_8.dat")
   ! Try a direct access read on a formatted sequential rile
   READ (11, REC = I, ERR = 99) TEMP_CHANGES
   call abort
diff --git a/gcc/testsuite/gfortran.dg/f2003_inquire_1.f03 b/gcc/testsuite/gfortran.dg/f2003_inquire_1.f03
index 544a810..87ddf59 100644
--- a/gcc/testsuite/gfortran.dg/f2003_inquire_1.f03
+++ b/gcc/testsuite/gfortran.dg/f2003_inquire_1.f03
@@ -4,7 +4,7 @@ character(25) :: sround, ssign, sasynchronous, sdecimal, sencoding
 integer :: vsize, vid
 logical :: vpending
 
-open(10, file='mydata', asynchronous="yes", blank="null", &
+open(10, file='mydata_f2003_inquire_1', asynchronous="yes", blank="null", &
 & decimal="comma", encoding="utf-8", sign="plus")
 
 inquire(unit=10, round=sround, sign=ssign, size=vsize, id=vid, &
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_1.f03 b/gcc/testsuite/gfortran.dg/f2003_io_1.f03
index f1d67c5..2a2294f 100644
--- a/gcc/testsuite/gfortran.dg/f2003_io_1.f03
+++ b/gcc/testsuite/gfortran.dg/f2003_io_1.f03
@@ -8,7 +8,7 @@ character(25) :: msg
 
 a = 23.45
 b = 0.0
-open(10, file='mydata', asynchronous="yes", blank="null")
+open(10, file='mydata_f2003_io_1', asynchronous="yes", blank="null")
 
 write(10,'(10f8.3)', asynchronous="yes", decimal="comma", id=j) a
 rewind(10)
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_2.f03 b/gcc/testsuite/gfortran.dg/f2003_io_2.f03
index 54c0516..599eb5b 100644
--- a/gcc/testsuite/gfortran.dg/f2003_io_2.f03
+++ b/gcc/testsuite/gfortran.dg/f2003_io_2.f03
@@ -7,7 +7,7 @@ character(25) :: msg
 real, dimension(10) :: a, b
 
 a = 43.21
-open(10, file='mydata', asynchronous="yes")
+open(10, file='mydata_f2003_io_2', asynchronous="yes")
 write(10,'(10f8.3)', asynchronous="yes", decimal="comma") a
 rewind(10)
 read(10,'(10f8.3)', asynchronous="yes", decimal="comma", id=idvar) b
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_8.f03 b/gcc/testsuite/gfortran.dg/f2003_io_8.f03
index 2362697..4d2f002 100644
--- a/gcc/testsuite/gfortran.dg/f2003_io_8.f03
+++ b/gcc/testsuite/gfortran.dg/f2003_io_8.f03
@@ -6,7 +6,7 @@ real :: c
 integer :: istat, j
 character(25) :: msg
 
-open(10, file='mydata', asynchronous="yes", blank="null")
+open(10, file='mydata_f2003_io_8', asynchronous="yes", blank="null")
 write(10,'(10f8.3)', asynchronous='no', decimal="comma", id=j) a ! { dg-error "must be with ASYNCHRONOUS=" }
 read(10,'(10f8.3)', id=j, decimal="comma", blank="zero") b ! { dg-error "must be with ASYNCHRONOUS=" }
 read(10,'(10f8.3)', asynchronous=msg, decimal="comma", blank="zero") b ! { dg-error "must be an initialization expression" }
diff --git a/gcc/testsuite/gfortran.dg/inquire_size.f90 b/gcc/testsuite/gfortran.dg/inquire_size.f90
index 13876cf..ce2db48 100644
--- a/gcc/testsuite/gfortran.dg/inquire_size.f90
+++ b/gcc/testsuite/gfortran.dg/inquire_size.f90
@@ -4,7 +4,7 @@ integer :: i
 character(30) :: aname = "noname"
 logical :: is_named
 
-open(25, file="testfile", status="replace", access="stream", form="unformatted")
+open(25, file="testfile_inquire_size", status="replace", access="stream", form="unformatted")
 do i=1,100
   write(25) i, "abcdefghijklmnopqrstuvwxyz"
 enddo
@@ -14,16 +14,16 @@ enddo
 
 inquire(unit=25, named=is_named, name=aname, size=i)
 if (.not.is_named) call abort
-if (aname /= "testfile") call abort
+if (aname /= "testfile_inquire_size") call abort
 if (i /= 3000) call abort
 
-inquire(file="testfile", size=i)
+inquire(file="testfile_inquire_size", size=i)
 if (.not.is_named) call abort
-if (aname /= "testfile") call abort
+if (aname /= "testfile_inquire_size") call abort
 if (i /= 3000) call abort
 
 close(25, status="delete")
-inquire(file="testfile", size=i)
+inquire(file="testfile_inquire_size", size=i)
 if (i /= -1)  call abort
 end
 
diff --git a/gcc/testsuite/gfortran.dg/namelist_66.f90 b/gcc/testsuite/gfortran.dg/namelist_66.f90
index d779ea7..436304e 100644
--- a/gcc/testsuite/gfortran.dg/namelist_66.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_66.f90
@@ -17,7 +17,7 @@ end type qptracer
 type(qptracer) , dimension(3) :: qtracer
 namelist/naml2/  qtracer
 
-open (99, file='nml.dat', status="replace")
+open (99, file='nml_66.dat', status="replace")
 write(99,*) "&naml1"
 write(99,*) "   tracer(1)   = 'aa', .true."
 write(99,*) "   tracer(2)   = 'bb', .true."
diff --git a/gcc/testsuite/gfortran.dg/namelist_82.f90 b/gcc/testsuite/gfortran.dg/namelist_82.f90
index 399d59f..aae700f 100644
--- a/gcc/testsuite/gfortran.dg/namelist_82.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_82.f90
@@ -10,7 +10,7 @@ namelist/naml1/  tracer
 
 tracer(:) = ptracer('XXX', .false.)
 
-open (99, file='nml.dat', status="replace")
+open (99, file='nml_82.dat', status="replace")
 write(99,*) "&naml1"
 !write(99,*) "   tracer(2)   = 'bb' , .true."
 write(99,*) "   tracer(:)   = 'aa' , .true."
diff --git a/gcc/testsuite/gfortran.dg/namelist_87.f90 b/gcc/testsuite/gfortran.dg/namelist_87.f90
index 8528a5c..c19d106 100644
--- a/gcc/testsuite/gfortran.dg/namelist_87.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_87.f90
@@ -30,7 +30,7 @@ character(3) :: c2 = 'YYY'
 character(3) :: c3 = 'ZZZ'
 namelist /nml/ i, r1,r2,r3,r4,r5,c,ll,c1,c2,c3
 
-open (99, file='nml.dat', status="replace")
+open (99, file='nml_87.dat', status="replace")
 write(99,*) "&nml"
 write(99,*) "  i=42!11"         ! Fixed BUG: wrong result: Unmodified, no error
 write(99,*) "  r1=43!11"        ! Fixed BUG: wrong result: Unmodified, no error
diff --git a/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90 b/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90
index bbcf46b..93ea1f1 100644
--- a/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90
+++ b/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90
@@ -9,7 +9,7 @@ program nutest
     logical l
     integer id, ios
 
-    open(newunit=id, file="foo.txt", iostat=ios)
+    open(newunit=id, file="foo_open_negative_unit_1.txt", iostat=ios)
     if (ios /= 0) call abort
 
     open(id, file="bar.txt", iostat=ios)
@@ -17,14 +17,14 @@ program nutest
 
     close(id, status="delete")
 
-    open(unit=10, file="foo.txt", status="old", iostat=ios)
+    open(unit=10, file="foo_open_negative_unit_1.txt", status="old", iostat=ios)
     if (ios /= 0) call abort
 
     close(10, status="delete")
 
-    open(-10, file="foo.txt", iostat=ios)
+    open(-10, file="foo_open_negative_unit_1.txt", iostat=ios)
     if (ios == 0) call abort
 
-    inquire(file="foo.txt", exist=l)
+    inquire(file="foo_open_negative_unit_1.txt", exist=l)
     if (l) call abort
 end program nutest
diff --git a/gcc/testsuite/gfortran.dg/open_new.f90 b/gcc/testsuite/gfortran.dg/open_new.f90
index 96edd93..6f36ca0 100644
--- a/gcc/testsuite/gfortran.dg/open_new.f90
+++ b/gcc/testsuite/gfortran.dg/open_new.f90
@@ -3,9 +3,9 @@
 !            status="new" is an error
 program main
   nout = 10
-  open(nout, file="foo.dat", status="replace")     ! make sure foo.dat exists
+  open(nout, file="foo_open_new.dat", status="replace")     ! make sure foo_open_new.dat exists
   close(nout)
-  open(nout, file="foo.dat", status="new",err=100)
+  open(nout, file="foo_open_new.dat", status="new",err=100)
   call abort                 ! This should never happen
-100 call unlink ("foo.dat")
+100 call unlink ("foo_open_new.dat")
 end program main
diff --git a/gcc/testsuite/gfortran.dg/stat_1.f90 b/gcc/testsuite/gfortran.dg/stat_1.f90
index 95ad66a..ec582f9 100644
--- a/gcc/testsuite/gfortran.dg/stat_1.f90
+++ b/gcc/testsuite/gfortran.dg/stat_1.f90
@@ -1,7 +1,7 @@
 ! { dg-do run }
 ! { dg-skip-if "" { *-*-mingw* spu-*-* } { "*" } { "" } }
 ! { dg-options "-std=gnu" }
-  character(len=*), parameter :: f = "testfile"
+  character(len=*), parameter :: f = "testfile_stat_1"
   integer :: s1(13), r1, s2(13), r2, s3(13), r3, d(13), rd
   
   open (10,file=f)
diff --git a/gcc/testsuite/gfortran.dg/stat_2.f90 b/gcc/testsuite/gfortran.dg/stat_2.f90
index a530ec3..a3eb6b2 100644
--- a/gcc/testsuite/gfortran.dg/stat_2.f90
+++ b/gcc/testsuite/gfortran.dg/stat_2.f90
@@ -1,7 +1,7 @@
 ! { dg-do run }
 ! { dg-skip-if "" { *-*-mingw* spu-*-* } { "*" } { "" } }
 ! { dg-options "-std=gnu" }
-  character(len=*), parameter :: f = "testfile"
+  character(len=*), parameter :: f = "testfile_stat_2"
   integer :: s1(13), r1, s2(13), r2, s3(13), r3, d(13), rd
   
   open (10,file=f)
diff --git a/gcc/testsuite/gfortran.dg/streamio_15.f90 b/gcc/testsuite/gfortran.dg/streamio_15.f90
index bbe91f1..eee59a4 100644
--- a/gcc/testsuite/gfortran.dg/streamio_15.f90
+++ b/gcc/testsuite/gfortran.dg/streamio_15.f90
@@ -13,7 +13,7 @@ program main
   if (newline_length < 1 .or. newline_length > 2) call abort
   close(20)
 
-  open(20,file="foo.txt",form="formatted",access="stream")
+  open(20,file="foo_streamio_15.txt",form="formatted",access="stream")
   write(20,'(A)') '123456'
   write(20,'(A)') 'abcdef'
   write(20,'(A)') 'qwerty'
diff --git a/gcc/testsuite/gfortran.dg/unf_read_corrupted_1.f90 b/gcc/testsuite/gfortran.dg/unf_read_corrupted_1.f90
index e7bb441..1cf879b 100644
--- a/gcc/testsuite/gfortran.dg/unf_read_corrupted_1.f90
+++ b/gcc/testsuite/gfortran.dg/unf_read_corrupted_1.f90
@@ -10,13 +10,13 @@ program main
   ! Write out a truncated unformatted sequential file by
   ! using unformatted stream.
 
-  open (10, form="unformatted", access="stream", file="foo.dat", &
+  open (10, form="unformatted", access="stream", file="foo_unf_read_corrupted_1.dat", &
   status="unknown")
   write (10) 16_4, 1_4
   close (10, status="keep")
 
   ! Try to read
-  open (10, file="foo.dat", form="unformatted", access="sequential")
+  open (10, file="foo_unf_read_corrupted_1.dat", form="unformatted", access="sequential")
   i1 = 0
   i2 = 0
   read (10, iostat=ios, iomsg=msg) i1, i2

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

* Re: [testsuite] Fix potential race conditions in gfortran tests
  2015-10-16  8:10 [testsuite] Fix potential race conditions in gfortran tests Christophe Lyon
@ 2015-10-18 14:36 ` Mikael Morin
  2015-10-22 20:14   ` Maxim Kuvyrkov
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Morin @ 2015-10-18 14:36 UTC (permalink / raw)
  To: Christophe Lyon, gcc-patches, Maxim Kuvyrkov

Le 16/10/2015 10:08, Christophe Lyon a écrit :
> Hi,
>
> We have noticed a few random failures in gfortran tests in our validations.
>
> Maxim investigated some of them and noticed a possible race condition
> in the streamio tests, for which he'll post a patch.
>
> I looked for other similar cases (checking which files are unlinked
> several times during 'make check'), and noticed that a few other cases
> might read/write/delete the same file concurrently.
>
> The proposed fix is to use different names for the different testcases.
>
> I ran make check -jX on various ARM/AArch64 configuration with no regression.
>
> OK?
>
Looks good to me.  Thanks.

Mikael

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

* Re: [testsuite] Fix potential race conditions in gfortran tests
  2015-10-18 14:36 ` Mikael Morin
@ 2015-10-22 20:14   ` Maxim Kuvyrkov
  2015-10-23 18:34     ` Mikael Morin
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Kuvyrkov @ 2015-10-22 20:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: Christophe Lyon, Mikael Morin

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

Hi,

And this is a similar patch for gfortran.dg/streamio_N.f90 tests.

OK to commit?

--
Maxim Kuvyrkov
www.linaro.org



> On Oct 18, 2015, at 4:17 PM, Mikael Morin <mikael.morin@sfr.fr> wrote:
> 
> Le 16/10/2015 10:08, Christophe Lyon a écrit :
>> Hi,
>> 
>> We have noticed a few random failures in gfortran tests in our validations.
>> 
>> Maxim investigated some of them and noticed a possible race condition
>> in the streamio tests, for which he'll post a patch.
>> 
>> I looked for other similar cases (checking which files are unlinked
>> several times during 'make check'), and noticed that a few other cases
>> might read/write/delete the same file concurrently.
>> 
>> The proposed fix is to use different names for the different testcases.
>> 
>> I ran make check -jX on various ARM/AArch64 configuration with no regression.
>> 
>> OK?
>> 
> Looks good to me.  Thanks.
> 
> Mikael


[-- Attachment #2: 0001-Fix-race-on-temp-file-in-gfortran-streamio_-.f90-tes.ChangeLog --]
[-- Type: application/octet-stream, Size: 306 bytes --]

2015-10-22  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.

[-- Attachment #3: 0001-Fix-race-on-temp-file-in-gfortran-streamio_-.f90-tes.patch --]
[-- Type: application/octet-stream, Size: 4793 bytes --]

From 983da6fe2f4a5d62c9dc1bc8e464746d1eb5f607 Mon Sep 17 00:00:00 2001
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Date: Thu, 22 Oct 2015 22:00:02 +0200
Subject: [PATCH] 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.

Change-Id: I2c6d9b2c3c6bf18cd8bc7cacc76cce6d842bc817
---
 gcc/testsuite/gfortran.dg/streamio_10.f90 | 2 +-
 gcc/testsuite/gfortran.dg/streamio_12.f90 | 2 +-
 gcc/testsuite/gfortran.dg/streamio_4.f90  | 4 ++--
 gcc/testsuite/gfortran.dg/streamio_5.f90  | 4 ++--
 gcc/testsuite/gfortran.dg/streamio_6.f90  | 2 +-
 gcc/testsuite/gfortran.dg/streamio_7.f90  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

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
-- 
1.9.1


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

* Re: [testsuite] Fix potential race conditions in gfortran tests
  2015-10-22 20:14   ` Maxim Kuvyrkov
@ 2015-10-23 18:34     ` Mikael Morin
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Morin @ 2015-10-23 18:34 UTC (permalink / raw)
  To: Maxim Kuvyrkov, gcc-patches; +Cc: Christophe Lyon

Le 22/10/2015 22:04, Maxim Kuvyrkov a écrit :
> Hi,
>
> And this is a similar patch for gfortran.dg/streamio_N.f90 tests.
>
> OK to commit?
>
Sure.

Mikael

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

end of thread, other threads:[~2015-10-23 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16  8:10 [testsuite] Fix potential race conditions in gfortran tests Christophe Lyon
2015-10-18 14:36 ` Mikael Morin
2015-10-22 20:14   ` Maxim Kuvyrkov
2015-10-23 18:34     ` Mikael Morin

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).