public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* random struct-layout-1 link failures caused by timeouts
@ 2016-02-03 22:35 Mike Stump
  0 siblings, 0 replies; only message in thread
From: Mike Stump @ 2016-02-03 22:35 UTC (permalink / raw)
  To: GCC Patches

I added dg-timeout-factor support to compat.exp, so that one can use it in struct-layout-1.exp test cases.


To use it, one can do something like:

diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index 80c7355..bc34f2a 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -50,7 +50,8 @@ const char *dg_options[] = {
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
-"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
+"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n",
+"/* { dg-timeout-factor 10 } */\n"
 #define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
 };

if they want.  On my target and my usual host environment, I randomly get timeouts on linking.  The default of 300 doesn’t seem to be enough.

I don’t know if others hit this (I’m -j24 with 128 GB ram on a local zfs with spinning rust under it), so I didn’t bother checking in the above.  If others want to report on wether they see random link failures, I’d be happy to check it in, let me know.


 
	* lib/compat.exp (compat-get-options-main): Add dg-timeout-factor
	support for struct-layout-1.exp.

diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index 77d6705..63d78cc 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -170,7 +170,8 @@ proc compat-get-options-main { src } {
 	if { ![string compare "dg-options" $cmd] \
 	     || [string match "dg-prune-output" $cmd] \
 	     || [string match "dg-skip-if" $cmd] \
-	     || [string match "dg-require-*" $cmd]  } {
+	     || [string match "dg-require-*" $cmd] \
+	     || [string match "dg-timeout-factor" $cmd]  } {
 	    set status [catch "$op" errmsg]
 	    if { $status != 0 } {
 		perror "src: $errmsg for \"$op\"\n"
@@ -215,7 +216,8 @@ proc compat-get-options { src } {
 	set cmd [lindex $op 0]
 	if { ![string compare "dg-options" $cmd] \
 	     || ![string compare "dg-prune-output" $cmd] \
-	     || ![string compare "dg-xfail-if" $cmd] } {
+	     || ![string compare "dg-xfail-if" $cmd] \
+	     || ![string compare "dg-timeout-factor" $cmd] } {
 	    set status [catch "$op" errmsg]
 	    if { $status != 0 } {
 		perror "src: $errmsg for \"$op\"\n"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-03 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 22:35 random struct-layout-1 link failures caused by timeouts Mike Stump

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