Patchwork [testsuite,fortran] Increase gfortran.dg/cray_pointers_2.f90 timeout

login
register
mail settings
Submitter Rainer Orth
Date Jan. 14, 2011, 5:47 p.m.
Message ID <ydd1v4fl6n1.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/78975/
State New
Headers show

Comments

Rainer Orth - Jan. 14, 2011, 5:47 p.m.
Tobias Burnus <burnus@net-b.de> writes:

>> Unless the patch can be simplified somewhat to reduce the compilation
>> time, I'd like to install the following patch on trunk, 4.4 and 4.5
>> branches.
>
> I think reducing the test itself is not really an option. What would help
> is to run it only once - and not several times with different
> options. That's a test case which should work with all options if it works
> with -O3. However, I have no idea how to convince DejaGNU to compile/run
> this particular test case only once.

I've found a way, but it isn't pretty:

gcc/testsuite/lib/gfortran-dg.exp (gfortran-dg-runtest) has this
snippet:

        # look if this is dg-do-run test, in which case
        # we cycle through the option list, otherwise we don't
        if [expr [search_for $test "dg-do run"]] {
            set option_list $torture_with_loops
        } else {
            set option_list [list { -O } ]
        }

Since I've found no part of the gfortran testsuite that doesn't cycle
through optimization options, the following hack makes use of the code
above: it puts two spaces between dg-do and run, thus avoiding the loop.
You have been warned!

Anyway, it works, tested by the appropriate runtest invocation on
i386-pc-solaris2.11.

Ok for mainline and branches?

	Rainer


2011-01-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gfortran.dg/cray_pointers_2.f90: Avoid cycling through
	optimization options.
Tobias Burnus - Jan. 23, 2011, 10:49 p.m.
Rainer Orth wrote:
> I've found a way, but it isn't pretty:

> Anyway, it works, tested by the appropriate runtest invocation on
> i386-pc-solaris2.11.
>
> Ok for mainline and branches?

OK. (I agree that it is ugly.)

Tobias

> 2011-01-14  Rainer Orth<ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* gfortran.dg/cray_pointers_2.f90: Avoid cycling through
> 	optimization options.
>
> diff -r 6c184227ca86 gcc/testsuite/gfortran.dg/cray_pointers_2.f90
> --- a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90	Fri Jan 14 10:25:46 2011 +0100
> +++ b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90	Fri Jan 14 18:42:56 2011 +0100
> @@ -1,5 +1,7 @@
> -! { dg-do run }
> -! { dg-options "-fcray-pointer -fbounds-check -fno-inline" }
> +! Using two spaces between dg-do and run is a hack to keep gfortran-dg-runtest
> +! from cycling through optimization options for this expensive test.
> +! { dg-do  run }
> +! { dg-options "-O3 -fcray-pointer -fbounds-check -fno-inline" }
>   ! { dg-timeout-factor 4 }
>   !
>   ! Series of routines for testing a Cray pointer implementation
Rainer Orth - Jan. 24, 2011, 9:39 a.m.
Tobias Burnus <burnus@net-b.de> writes:

> Rainer Orth wrote:
>> I've found a way, but it isn't pretty:
>
>> Anyway, it works, tested by the appropriate runtest invocation on
>> i386-pc-solaris2.11.
>>
>> Ok for mainline and branches?
>
> OK. (I agree that it is ugly.)

A proper fix would be to introduce a part of the gfortran testsuite that
isn't a torture test, like all other languages do.  Certainly not 4.6
material, though.

	Rainer

Patch

diff -r 6c184227ca86 gcc/testsuite/gfortran.dg/cray_pointers_2.f90
--- a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90	Fri Jan 14 10:25:46 2011 +0100
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90	Fri Jan 14 18:42:56 2011 +0100
@@ -1,5 +1,7 @@ 
-! { dg-do run }
-! { dg-options "-fcray-pointer -fbounds-check -fno-inline" }
+! Using two spaces between dg-do and run is a hack to keep gfortran-dg-runtest
+! from cycling through optimization options for this expensive test.
+! { dg-do  run }
+! { dg-options "-O3 -fcray-pointer -fbounds-check -fno-inline" }
 ! { dg-timeout-factor 4 }
 !
 ! Series of routines for testing a Cray pointer implementation