* [committed][gdb/testsuite] Fix timeouts with -readnow
@ 2020-04-28 9:32 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-04-28 9:32 UTC (permalink / raw)
To: gdb-patches
Hi,
With target board readnow, I run into timeouts for test cases
gdb.base/multi-forks.exp and gdb.threads/fork-plus-threads.exp.
Fix these using with_timeout_factor.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix timeouts with -readnow
gdb/testsuite/ChangeLog:
2020-04-28 Tom de Vries <tdevries@suse.de>
* gdb.base/multi-forks.exp: Use with_timeout_factor.
* gdb.threads/fork-plus-threads.exp: Same.
---
gdb/testsuite/gdb.base/multi-forks.exp | 5 ++-
gdb/testsuite/gdb.threads/fork-plus-threads.exp | 41 +++++++++++++------------
2 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index 59d953b04d6..0d75d0c153c 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -149,7 +149,10 @@ gdb_test_no_output "set detach off" "set detach off"
#
for {set i 1} {$i <= 15} {incr i} {
- gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i"
+ # Fix timeouts with -readnow.
+ with_timeout_factor 3 {
+ gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i"
+ }
gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior $i"
gdb_test "inferior $i + 1" "(_dl_sysinfo_int80|fork|__kernel_(v|)syscall).*" \
"inferior $i"
diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
index 8d36b96810b..91453329c26 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
@@ -78,25 +78,28 @@ proc do_test { detach_on_fork } {
set saw_thread_stopped 0
set test "inferior 1 exited"
- gdb_test_multiple "" $test {
- -re "Cannot remove breakpoints" {
- set saw_cannot_remove_breakpoints 1
- exp_continue
- }
- -re "Thread \[^\r\n\]+ stopped\\." {
- set saw_thread_stopped 1
- exp_continue
- }
- -re "Thread \[^\r\n\]+ exited" {
- # Avoid timeout with check-read1
- exp_continue
- }
- -re "New Thread \[^\r\n\]+" {
- # Avoid timeout with check-read1
- exp_continue
- }
- -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
- pass $test
+ # Fix timeouts with -readnow.
+ with_timeout_factor 3 {
+ gdb_test_multiple "" $test {
+ -re "Cannot remove breakpoints" {
+ set saw_cannot_remove_breakpoints 1
+ exp_continue
+ }
+ -re "Thread \[^\r\n\]+ stopped\\." {
+ set saw_thread_stopped 1
+ exp_continue
+ }
+ -re "Thread \[^\r\n\]+ exited" {
+ # Avoid timeout with check-read1
+ exp_continue
+ }
+ -re "New Thread \[^\r\n\]+" {
+ # Avoid timeout with check-read1
+ exp_continue
+ }
+ -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
+ pass $test
+ }
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-28 9:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 9:32 [committed][gdb/testsuite] Fix timeouts with -readnow Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox