This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] print-threads.exp: Extend timeout for slower tests.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Wed, 2 Nov 2011 15:11:54 -0700 (PDT)
- Subject: [patch] print-threads.exp: Extend timeout for slower tests.
Hi.
This test can errantly fail due to timeouts,
so this patch extends the timeout for the slower tests.
I will commit this in a few days if there are no objections.
2011-11-02 Doug Evans <dje@google.com>
* testsuite/gdb.threads/print-threads.exp: Extend timeout for slower
tests.
Index: print-threads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/print-threads.exp,v
retrieving revision 1.19
diff -u -p -r1.19 print-threads.exp
--- print-threads.exp 7 Mar 2011 16:03:03 -0000 1.19
+++ print-threads.exp 2 Nov 2011 22:09:35 -0000
@@ -98,6 +98,9 @@ proc test_all_threads { name kill } {
}
}
+# Record the old timeout, we need to extend it for slower tests.
+set oldtimeout $timeout
+
runto_main
gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\."
gdb_test_no_output "set var slow = 0"
@@ -106,12 +109,18 @@ test_all_threads "fast" 0
runto_main
gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (2)"
gdb_test_no_output "set var slow = 1"
+# Extend the timeout for slower tests.
+set timeout [expr $oldtimeout + 120]
test_all_threads "slow" 0
+set $timeout $oldtimeout
runto_main
gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (3)"
gdb_test_no_output "set var slow = 1" "set var slow = 1 (2)"
gdb_breakpoint "kill"
+# Extend the timeout for slower tests.
+set timeout [expr $oldtimeout + 120]
test_all_threads "slow with kill breakpoint" 1
+set $timeout $oldtimeout
return 0