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

Message ID 20190801090000.GA30211@delia
State New, archived
Headers

Commit Message

Tom de Vries Aug. 1, 2019, 9 a.m. UTC
  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  <tdevries@suse.de>

	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(+)
  

Patch

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
 	}