Patchwork increase timeout in simulate-thread gdb test

login
register
mail settings
Submitter Rainer Orth
Date Feb. 16, 2012, 8:47 p.m.
Message ID <yddsjiapksu.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/141687/
State New
Headers show

Comments

Rainer Orth - Feb. 16, 2012, 8:47 p.m.
Andrew MacLeod <amacleod@redhat.com> writes:

> On 02/09/2012 09:38 AM, Uros Bizjak wrote:
>> On Thu, Feb 9, 2012 at 3:12 PM, Aldy Hernandez<aldyh@redhat.com>  wrote:
>>
>> It was me, and the sole reason was that timeout didn't worked and the
>> log filled the file system. After timeout functionality was fixed, the
>> timeout was forced to 10 seconds. It is an arbitrary number.
>>
> I suspected as much.  Long term I think we should remove the line by line
> log info as the default.

Even with the 20-second timeout, I was seeing lots of failures on slower
machines, like sparc, alpha, or mips.  I've had good success with the
following patch which uses the default dejagnu timeout instead of some
arbitrary value.  It even takes into account users doubling the default
timeout (as I have to do on IRIX).

With this patch, all those FAILs on Solaris are gone, on IRIX only 

FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O0 -g  thread simulation test
FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O2 -g  thread simulation test
FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O3 -g  thread simulation test
FAIL: gcc.dg/simulate-thread/atomic-other-short.c  -O0 -g  thread simulation test
FAIL: gcc.dg/simulate-thread/atomic-other-short.c  -O2 -g  thread simulation test
FAIL: gcc.dg/simulate-thread/atomic-other-short.c  -O3 -g  thread simulation test

are left.  Only on Tru64 UNIX do I still see lots of failures.  I've to
investigate whether or not they are timeout-related.

Admittedly, it has the disadvantage of potentially filling the log files
if things go badly wrong.

What do you think?

	Rainer


2012-02-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/51753
	* lib/gcc-simulate-thread.exp: Load timeout.exp.
	(simulate-thread): Use default timeout.
Mike Stump - Feb. 16, 2012, 9:32 p.m.
On Feb 16, 2012, at 12:47 PM, Rainer Orth wrote:
> Even with the 20-second timeout, I was seeing lots of failures on slower
> machines, like sparc, alpha, or mips.  I've had good success with the
> following patch which uses the default dejagnu timeout instead of some
> arbitrary value.  It even takes into account users doubling the default
> timeout (as I have to do on IRIX).

Ah, I like this version better than the 20...  Let's give the simulate threads people a chance to veto this, if they want.  If they don't want to, Ok.
Andrew MacLeod - Feb. 16, 2012, 9:57 p.m.
On 02/16/2012 04:32 PM, Mike Stump wrote:
> On Feb 16, 2012, at 12:47 PM, Rainer Orth wrote:
>> Even with the 20-second timeout, I was seeing lots of failures on slower
>> machines, like sparc, alpha, or mips.  I've had good success with the
>> following patch which uses the default dejagnu timeout instead of some
>> arbitrary value.  It even takes into account users doubling the default
>> timeout (as I have to do on IRIX).
> Ah, I like this version better than the 20...  Let's give the simulate threads people a chance to veto this, if they want.  If they don't want to, Ok.
Im fine with it, that was in fact the original intention.  I'll look at 
what options may reduce the log size....

Andrew

Patch

# HG changeset patch
# Parent 20c4f5db4968654fb36aa38d0800fbee28457be3
Increase simulate-thread timeout (PR target/51753)

diff --git a/gcc/testsuite/lib/gcc-simulate-thread.exp b/gcc/testsuite/lib/gcc-simulate-thread.exp
--- a/gcc/testsuite/lib/gcc-simulate-thread.exp
+++ b/gcc/testsuite/lib/gcc-simulate-thread.exp
@@ -1,4 +1,4 @@ 
-#   Copyright (C) 2011 Free Software Foundation, Inc.
+#   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,6 +14,8 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+load_lib timeout.exp
+
 # Utility for running a given test through the simulate-thread harness
 # using gdb.  This is invoked via dg-final.
 #
@@ -56,8 +58,7 @@  proc simulate-thread { args } {
 
     set gdb_worked 0
 
-    # Set timeout to 20 seconds due to huge amount of generated log.
-    remote_expect target 20 {
+    remote_expect target [timeout_value] {
 	# Too old GDB
 	-re "Unhandled dwarf expression|Error in sourced command file" {
 	    unsupported "$testcase $message"