public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Fortran, committed] Fix bugs in the dg-* directives in the test suite (was: testsuite oddities)
       [not found] <51AD115A.5080202@gmx.ch>
@ 2013-06-04  7:37 ` Tobias Burnus
  2013-06-04 16:58   ` Mike Stump
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Burnus @ 2013-06-04  7:37 UTC (permalink / raw)
  To: Manfred Schwarb; +Cc: fortran, gcc patches

Manfred Schwarb wrote:
> I did some tests for unbalanced curly braces in the gfortran testsuite
> and got quite some output, see attached patch.
>
> additionally,
> - corrected "dg-do  run" issues (double space)

I think some of the test cases might to it on purpose: "dg-do  run" 
causes the test case to run only once while "dg-do run" runs multiple 
times with different options. If the testcase is supposed to test the 
run-time library, calling it multiple times is pointless. Admittedly, 
using two spaces is an ugly hack, but creating a "dg-do run-single" is 
difficult. Those test cases are rather quick, hence, running multiple 
times, keeping the double space version or doing the latter but adding a 
comment all work.

> - dg-flags should be dg-options
> - string adjustments needed after fixing curly braces

Thanks for the patches! Committed as http://gcc.gnu.org/r199636

Tobias

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

* Re: [Fortran, committed] Fix bugs in the dg-* directives in the test suite (was: testsuite oddities)
  2013-06-04  7:37 ` [Fortran, committed] Fix bugs in the dg-* directives in the test suite (was: testsuite oddities) Tobias Burnus
@ 2013-06-04 16:58   ` Mike Stump
  2013-06-04 16:59     ` Mike Stump
  2013-06-04 17:12     ` [Fortran, committed] Fix bugs in the dg-* directives in the test suite Tobias Burnus
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Stump @ 2013-06-04 16:58 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Manfred Schwarb, fortran, gcc patches

On Jun 4, 2013, at 12:37 AM, Tobias Burnus <burnus@net-b.de> wrote:
> I think some of the test cases might to it on purpose: "dg-do  run" causes the test case to run only once while "dg-do run" runs multiple times with different options. If the testcase is supposed to test the run-time library, calling it multiple times is pointless. Admittedly, using two spaces is an ugly hack,

:-o, The things we never knew.  Anyway, use of hacks like this, should result in the hack being documented.  At least then we can find them with find-grep in emacs, and know about it.  I'm not in favor of using hacks like this, I don't endorse it.  If someone wants to approve such a patch in their part of the test suite, that's fine with me.

> but creating a "dg-do run-single" is difficult.

Well, my first question is, why can't test cases that run in a context that means, run multiple times, be moved from that context, to a context that means, run once?  Seems straight forward.  In the C test suite, that would be moving from \*torture to \* (other than torture), usually.  If fortran doesn't have a run once context, seems reasonable to create one, I'd recommend doing this once there are 20 or more test cases that use the hack.

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

* Re: [Fortran, committed] Fix bugs in the dg-* directives in the test suite (was: testsuite oddities)
  2013-06-04 16:58   ` Mike Stump
@ 2013-06-04 16:59     ` Mike Stump
  2013-06-04 17:12     ` [Fortran, committed] Fix bugs in the dg-* directives in the test suite Tobias Burnus
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Stump @ 2013-06-04 16:59 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Manfred Schwarb, fortran, gcc patches

[ sorry for the dup ]

On Jun 4, 2013, at 12:37 AM, Tobias Burnus <burnus@net-b.de> wrote:
> I think some of the test cases might to it on purpose: "dg-do  run" causes the test case to run only once while "dg-do run" runs multiple times with different options. If the testcase is supposed to test the run-time library, calling it multiple times is pointless. Admittedly, using two spaces is an ugly hack,

:-o, The things we never knew.  Anyway, use of hacks like this, should result in the hack being documented.  At least then we can find them with find-grep in emacs, and know about it.  I'm not in favor of using hacks like this, I don't endorse it.  If someone wants to approve such a patch in their part of the test suite, that's fine with me.

> but creating a "dg-do run-single" is difficult.

Well, my first question is, why can't test cases that run in a context that means, run multiple times, be moved from that context, to a context that means, run once?  Seems straight forward.  In the C test suite, that would be moving from \*torture to \* (other than torture), usually.  If fortran doesn't have a run once context, seems reasonable to create one, I'd recommend doing this once there are 20 or more test cases that use the hack.

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

* Re: [Fortran, committed] Fix bugs in the dg-* directives in the test suite
  2013-06-04 16:58   ` Mike Stump
  2013-06-04 16:59     ` Mike Stump
@ 2013-06-04 17:12     ` Tobias Burnus
  1 sibling, 0 replies; 4+ messages in thread
From: Tobias Burnus @ 2013-06-04 17:12 UTC (permalink / raw)
  To: Mike Stump; +Cc: Manfred Schwarb, fortran, gcc patches

Mike Stump wrote:
> :-o, The things we never knew. Anyway, use of hacks like this, should 
> result in the hack being documented. At least then we can find them 
> with find-grep in emacs, and know about it. I'm not in favor of using 
> hacks like this, I don't endorse it. If someone wants to approve such 
> a patch in their part of the test suite, that's fine with me.

I think only cray_pointers_2.f90 strictly requires it as it takes quite 
long and, thus, caused problems on one system. See: 
http://gcc.gnu.org/ml/fortran/2011-01/msg00089.html

>> but creating a "dg-do run-single" is difficult.
> [...] If fortran doesn't have a run once context, seems reasonable to create one, I'd recommend doing this once there are 20 or more test cases that use the hack.

Maybe one should create a run-once context - to save some testing time. 
However, the number of test cases with "dg-do  run" is a low one digit 
number.

(Admittedly, I have no idea why the default gfortran.dg/dg.exp runs 
multiple times - and also not what's the exact purpose of 
gfortran.fortran-torture.)

Tobias

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

end of thread, other threads:[~2013-06-04 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <51AD115A.5080202@gmx.ch>
2013-06-04  7:37 ` [Fortran, committed] Fix bugs in the dg-* directives in the test suite (was: testsuite oddities) Tobias Burnus
2013-06-04 16:58   ` Mike Stump
2013-06-04 16:59     ` Mike Stump
2013-06-04 17:12     ` [Fortran, committed] Fix bugs in the dg-* directives in the test suite Tobias Burnus

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