[committed][gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp timeout with check-run1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[committed][gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp timeout with check-run1

Tom de Vries
Hi,

With gdb.threads/fork-plus-threads.exp and check-run1 we get:
...
FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: \
  inferior 1 exited (timeout)
...

Fix this by calling exp_continue for new thread and thread exited messages.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp timeout with check-run1

gdb/testsuite/ChangeLog:

2019-07-31  Tom de Vries  <[hidden email]>

        PR testsuite/24863
        * gdb.threads/fork-plus-threads.exp: Fix check-run1 timeout by
        calling exp_continue for new thread and thread exited messages.

---
 gdb/testsuite/gdb.threads/fork-plus-threads.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
index d4d0f18232..340a8df266 100644
--- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
@@ -87,6 +87,14 @@ proc do_test { detach_on_fork } {
     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
  }