public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Committed: fd_truncate test-cases updated for recent libgfortran changes
@ 2011-05-04 22:10 Hans-Peter Nilsson
  2011-05-05 16:44 ` Janne Blomqvist
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2011-05-04 22:10 UTC (permalink / raw)
  To: fortran, gcc-patches

Once or twice a year some regression results from changed I/O
in libgfortran, such that some existing test-case starts
calling libgfortran/io/unix.c:raw_truncate, which on
limited-I/O-bare-iron targets will emit "required ftruncate or
chsize support not present" and fail.  After a while, I get to
it and commit a patch such as the following, updating the
regressing tests and new ones I spot in gfortran.log with the
self-marked line above.  This time, it happened in 173155:173168.

Usually, there's also a brief question whether all changes were
intended, or perhaps that some of the regressing tests (here:
gfortran.dg/fmt_cache_1.f and gfortran.dg/ftell_3.f90) were not
really supposed to have raw_truncate called.  So, should they?

Two of the test-cases, gfortran.dg/endfile_3.f90 and
gfortran.dg/endfile_4.f90 actually pass, which seems wrong, as
raw_truncate after emitting the error message returns an error
indication (so, the test-program should abort or return an error
AFAICT).  Perhaps due to lack of error handling in the
call-chain to raw_truncate?

Anyway, committed as obvious.  See also
<http://gcc.gnu.org/ml/fortran/2009-07/msg00095.html>.

gcc/testsuite:
	* gfortran.dg/pr47878.f90, gfortran.dg/endfile_3.f90,
	gfortran.dg/endfile_4.f90, gfortran.dg/ftell_3.f90,
	gfortran.dg/fmt_cache_1.f, gfortran.dg/namelist_66.f90:
	Gate test on effective_target fd_truncate.

Index: gfortran.dg/endfile_4.f90
===================================================================
--- gfortran.dg/endfile_4.f90	(revision 173380)
+++ gfortran.dg/endfile_4.f90	(working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
 ! pr44477 ENDFILE not allowed after ENDFILE
 !-------------------------------------------
   open(10, form='formatted', &
Index: gfortran.dg/pr47878.f90
===================================================================
--- gfortran.dg/pr47878.f90	(revision 173380)
+++ gfortran.dg/pr47878.f90	(working copy)
@@ -1,5 +1,5 @@
 ! PR fortran/47878
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
   integer :: a(5)
   open (99, recl = 40)
   write (99, '(5i3)') 1, 2, 3
Index: gfortran.dg/namelist_66.f90
===================================================================
--- gfortran.dg/namelist_66.f90	(revision 173380)
+++ gfortran.dg/namelist_66.f90	(working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
 ! PR46010 Failure to read these two examples of namelists
 type ptracer
    character(len = 2)  :: sname
Index: gfortran.dg/ftell_3.f90
===================================================================
--- gfortran.dg/ftell_3.f90	(revision 173380)
+++ gfortran.dg/ftell_3.f90	(working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
 ! PR43605 FTELL intrinsic returns incorrect position
 ! Contributed by Janne Blomqvist, Manfred Schwarb
 ! and Dominique d'Humieres.
Index: gfortran.dg/endfile_3.f90
===================================================================
--- gfortran.dg/endfile_3.f90	(revision 173380)
+++ gfortran.dg/endfile_3.f90	(working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
 ! pr44477 READ/WRITE not allowed after ENDFILE 
 !-------------------------------------------
   open(10, form='formatted', &
Index: gfortran.dg/fmt_cache_1.f
===================================================================
--- gfortran.dg/fmt_cache_1.f	(revision 173380)
+++ gfortran.dg/fmt_cache_1.f	(working copy)
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run { target fd_truncate } }
 ! pr40662 segfaults when specific format is invoked twice.
 ! pr40330  incorrect io.
 ! test case derived from pr40662, <jvdelisle@gcc.gnu.org>

brgds, H-P

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

end of thread, other threads:[~2011-05-05 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 22:10 Committed: fd_truncate test-cases updated for recent libgfortran changes Hans-Peter Nilsson
2011-05-05 16:44 ` Janne Blomqvist
2011-05-05 18:08   ` Mike Stump
2011-05-05 18:48   ` Hans-Peter Nilsson

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