diff mbox series

testsuite: gm2: Remove timeout overrides [PR114886]

Message ID yddy18vxq9o.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series testsuite: gm2: Remove timeout overrides [PR114886] | expand

Commit Message

Rainer Orth April 30, 2024, 7:29 a.m. UTC
A large number of gm2 tests are timing out even on current Solaris/SPARC
systems.  As detailed in the PR, the problem is that the gm2 testsuite
artificially lowers many timeouts way below the DejaGnu default of 300
seconds, often as short as 10 seconds.  The problem lies both in the
values (they may be appropriate for some targets, but too low for
others, especially under high load) and the fact that it uses absolute
values, overriding e.g. settings from a build-wide site.exp.

Therefore this patch removes all those overrides, restoring the
defaults.

Tested on sparc-sun-solaris2.11 (where all the previous timeouts are
gone) and i386-pc-solaris2.11.

Ok for trunk and the gcc-14 branch once GCC 14.1.0 has been released?

	Rainer

Comments

Gaius Mulley April 30, 2024, 11:36 a.m. UTC | #1
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> A large number of gm2 tests are timing out even on current Solaris/SPARC
> systems.  As detailed in the PR, the problem is that the gm2 testsuite
> artificially lowers many timeouts way below the DejaGnu default of 300
> seconds, often as short as 10 seconds.  The problem lies both in the
> values (they may be appropriate for some targets, but too low for
> others, especially under high load) and the fact that it uses absolute
> values, overriding e.g. settings from a build-wide site.exp.
>
> Therefore this patch removes all those overrides, restoring the
> defaults.
>
> Tested on sparc-sun-solaris2.11 (where all the previous timeouts are
> gone) and i386-pc-solaris2.11.
>
> Ok for trunk and the gcc-14 branch once GCC 14.1.0 has been released?

yes this looks good to me please apply.  Thanks for the rationale
described in the PR.  As suggested, locally changing site.exp is more
appropriate should the need arise.  The dg-timeout code was added to
speed up testing/development of (a deadlocking) RTco.cc (which has
since been fixed)

regards,
Gaius
Rainer Orth April 30, 2024, 11:56 a.m. UTC | #2
Hi Gaius,

> yes this looks good to me please apply.  Thanks for the rationale

done for trunk.  I guess it's ok to apply to the gcc-14 branch after the
release and some soak time?

> described in the PR.  As suggested, locally changing site.exp is more
> appropriate should the need arise.  The dg-timeout code was added to
> speed up testing/development of (a deadlocking) RTco.cc (which has
> since been fixed)

Sure: while I've used increased global timeouts in the distant past
(IRIX, old and slow SPARC boxes), it certainly works both ways.

Thanks.
        Rainer
Gaius Mulley April 30, 2024, 2:52 p.m. UTC | #3
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Hi Gaius,
>
>> yes this looks good to me please apply.  Thanks for the rationale
>
> done for trunk.  I guess it's ok to apply to the gcc-14 branch after the
> release and some soak time?

many thanks - and yes certainly also to gcc-14 (after an appropriate
amount of delay),

regards,
Gaius
diff mbox series

Patch

# HG changeset patch
# Parent  7ce0689744625483e581866918724503e5630773
testsuite: gm2: Remove timeout overrides [PR114886]

diff --git a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp
--- a/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp
+++ b/gcc/testsuite/gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp
@@ -24,16 +24,11 @@  if $tracelevel then {
 
 # load support procs
 load_lib gm2-torture.exp
-load_lib timeout-dg.exp
 
 set gm2src ${srcdir}/../gm2
 
 gm2_init_cor ""
 
-# We should be able to compile, link or run in 20 seconds.
-gm2_push_timeout 20
-
-
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $testcase] then {
@@ -42,5 +37,3 @@  foreach testcase [lsort [glob -nocomplai
 
     gm2-torture-execute $testcase "" "pass"
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp
--- a/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp
+++ b/gcc/testsuite/gm2/examples/map/pass/examples-map-pass.exp
@@ -27,9 +27,6 @@  load_lib gm2-torture.exp
 
 gm2_init_pim "${srcdir}/${subdir}"
 
-# We should be able to compile, link or run in 30 seconds.
-gm2_push_timeout 30
-
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $testcase] then {
@@ -38,5 +35,3 @@  foreach testcase [lsort [glob -nocomplai
 
     gm2-torture $testcase
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp b/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp
--- a/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp
+++ b/gcc/testsuite/gm2/iso/run/pass/iso-run-pass.exp
@@ -23,14 +23,10 @@  if $tracelevel then {
 
 # load support procs
 load_lib gm2-torture.exp
-load_lib timeout-dg.exp
 
 gm2_init_iso "${srcdir}/gm2/iso/run/pass" -fsoft-check-all
 gm2_link_obj fileio.o
 
-# We should be able to compile, link or run in 60 seconds.
-gm2_push_timeout 60
-
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $testcase] then {
@@ -42,5 +38,3 @@  foreach testcase [lsort [glob -nocomplai
 	gm2-torture-execute $testcase "" "pass"
     }
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp b/gcc/testsuite/gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp
--- a/gcc/testsuite/gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp
+++ b/gcc/testsuite/gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp
@@ -24,15 +24,11 @@  if $tracelevel then {
 
 # load support procs
 load_lib gm2-torture.exp
-load_lib timeout-dg.exp
 
 set gm2src ${srcdir}/../m2
 
 gm2_init_pim ""
 
-# We should be able to compile, link or run in 60 seconds.
-gm2_push_timeout 60
-
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $testcase] then {
@@ -41,5 +37,3 @@  foreach testcase [lsort [glob -nocomplai
 
     gm2-torture-execute $testcase "" "pass"
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp b/gcc/testsuite/gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp
--- a/gcc/testsuite/gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp
+++ b/gcc/testsuite/gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp
@@ -29,11 +29,6 @@  set gm2src ${srcdir}/../m2
 
 gm2_init_iso ""
 
-# We should be able to compile, link or run in 45 seconds even on a
-# really slow host/target.
-
-gm2_push_timeout 45
-
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $testcase] then {
@@ -42,5 +37,3 @@  foreach testcase [lsort [glob -nocomplai
 
     gm2-torture-execute $testcase "" "pass"
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp b/gcc/testsuite/gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp
--- a/gcc/testsuite/gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp
+++ b/gcc/testsuite/gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp
@@ -23,10 +23,8 @@  if $tracelevel then {
 
 # load support procs
 load_lib gm2-torture.exp
-load_lib timeout-dg.exp
 
 gm2_init_pim "${srcdir}/gm2/switches/whole-program/run/pass" -fm2-whole-program
-gm2_push_timeout 120
 
 foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
     # If we're only testing specific files and this isn't one of them, skip it.
@@ -35,5 +33,3 @@  foreach testcase [lsort [glob -nocomplai
     }
     gm2-torture $testcase
 }
-
-gm2_pop_timeout
diff --git a/gcc/testsuite/lib/gm2-torture.exp b/gcc/testsuite/lib/gm2-torture.exp
--- a/gcc/testsuite/lib/gm2-torture.exp
+++ b/gcc/testsuite/lib/gm2-torture.exp
@@ -21,34 +21,6 @@ 
 load_lib file-format.exp
 load_lib target-libpath.exp
 load_lib timeout.exp
-load_lib timeout-dg.exp
-
-
-if {[info exists individual_timeout]} {
-    set gm2_previous_timeout $individual_timeout
-} else {
-    set gm2_previous_timeout 10
-}
-
-
-# We should be able to complete any test in 10 seconds.
-dg-timeout S 10
-
-
-# only push one level.
-
-proc gm2_push_timeout { secs } {
-    global individual_timeout
-    set individual_timeout $secs
-}
-
-
-proc gm2_pop_timeout { } {
-    global individual_timeout
-    global gm2_previous_timeout
-    set individual_timeout $gm2_previous_timeout
-}
-
 
 # The default option list can be overridden by
 # TORTURE_OPTIONS="{ { list1 } ... { listN } }"
diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp
--- a/gcc/testsuite/lib/gm2.exp
+++ b/gcc/testsuite/lib/gm2.exp
@@ -23,36 +23,6 @@  load_lib prune.exp
 load_lib gcc-defs.exp
 load_lib target-libpath.exp
 load_lib timeout.exp
-load_lib timeout-dg.exp
-
-
-if {[info exists individual_timeout]} {
-    set gm2_previous_timeout $individual_timeout
-} else {
-    set gm2_previous_timeout 10
-}
-
-
-# set gm2_previous_timeout $individual_timeout
-
-# We should be able to complete any test in 10 seconds.
-dg-timeout S 10
-
-
-# only push one level.
-
-proc gm2_push_timeout { secs } {
-    global individual_timeout
-    set individual_timeout $secs
-}
-
-
-proc gm2_pop_timeout { } {
-    global individual_timeout
-    global gm2_previous_timeout
-    set individual_timeout $gm2_previous_timeout
-}
-
 
 #
 # GCC_UNDER_TEST is the compiler under test.
@@ -167,10 +137,6 @@  proc gm2_init { args } {
 
     set gm2_link_path "[gm2_link_flags [get_multilibs]]"
     verbose $gm2_link_path 1
-
-    # Set the default timeout value, larger tests can override
-    # this if necessary.
-    dg-timeout S 10
 }