diff mbox

[testsuite] adjust timeout in gdb.base/freebpcmd.exp

Message ID 5627B95B.9040907@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore Oct. 21, 2015, 4:12 p.m. UTC
I've been observing random failures in gdb.base/freebpcmd.exp on a 
bare-metal target using RSP with a slow debug probe.  It seems that the 
hardwired timeout of 120 seconds for this test is just a little too low 
for this target.  It seems better to use with_timeout_factor instead of 
a hardwired value; choosing a factor of 10 here is totally random, but 
it seems to be plenty on this target (its default timeout is 60).

OK to commit?

-Sandra

Comments

Yao Qi Oct. 21, 2015, 4:39 p.m. UTC | #1
Hi Sandra,

On 21/10/15 17:12, Sandra Loosemore wrote:
>
> 2015-10-21  Sandra Loosemore<sandra@codesourcery.com>
>
> 	gdb/testsuite/
> 	* gdb.base/freebpcmd.exp: Use with_timeout_factor instead
> 	of hardwired timeout value.
>

Patch looks good to me.
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.base/freebpcmd.exp b/gdb/testsuite/gdb.base/freebpcmd.exp
index 2f46bc8..c7c0814 100644
--- a/gdb/testsuite/gdb.base/freebpcmd.exp
+++ b/gdb/testsuite/gdb.base/freebpcmd.exp
@@ -103,22 +103,19 @@  if {$i >= [llength $lines]} {
 
 gdb_run_cmd
 
-set prev_timeout $timeout
-set timeout 120
-
-gdb_test_multiple "" "run program with breakpoint commands" {
-    -re "warning: Invalid control type in command structure" {
-        kfail "gdb/1489" "run program with breakpoint commands"
-    }
-    -re "Invalid i value\r\n$gdb_prompt $" {
-	xfail "run program with breakpoint commands (i value not readable)"
-    }
-    -re "$gdb_prompt $" {
-        pass "run program with breakpoint commands"
-    }
-    eof {
-        kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
+with_timeout_factor 10 {
+    gdb_test_multiple "" "run program with breakpoint commands" {
+	-re "warning: Invalid control type in command structure" {
+	    kfail "gdb/1489" "run program with breakpoint commands"
+	}
+	-re "Invalid i value\r\n$gdb_prompt $" {
+	    xfail "run program with breakpoint commands (i value not readable)"
+	}
+	-re "$gdb_prompt $" {
+	    pass "run program with breakpoint commands"
+	}
+	eof {
+	    kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
+	}
     }
 }
-
-set timeout $prev_timeout