[gdb/testsuite] Fix gdb.threads/fork-plus-threads.exp timeout with check-run1
authorTom de Vries <tdevries@suse.de>
Thu, 1 Aug 2019 08:48:11 +0000 (10:48 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 1 Aug 2019 08:48:11 +0000 (10:48 +0200)
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.

gdb/testsuite/ChangeLog:

2019-08-01  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/ChangeLog
gdb/testsuite/gdb.threads/fork-plus-threads.exp

index 09921e0296837271aad83e8733d595d4aad91514..fc1c537c76be8b1a7d12cee5050c2317771ca251 100644 (file)
@@ -1,3 +1,9 @@
+2019-08-01  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.
+
 2019-08-01  Tom de Vries  <tdevries@suse.de>
 
        PR testsuite/24863
index d4d0f182320258be6b8a83c6a11a0fb22441ecaa..340a8df266c0947df21907f72d8f8c24d8a760b8 100644 (file)
@@ -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
        }