diff options
author | Tom de Vries <tdevries@suse.de> | 2020-03-14 15:48:26 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-03-14 15:48:26 +0100 |
commit | 54c4382534f0c894434deca5eb89cd02661d6feb (patch) | |
tree | 7c4a9d2b02b993ddcccc4989662642f571d65531 /gdb | |
parent | 75c56d3d1298de72aa67555f2c723a80b4818e04 (diff) | |
download | gdb-54c4382534f0c894434deca5eb89cd02661d6feb.zip gdb-54c4382534f0c894434deca5eb89cd02661d6feb.tar.gz gdb-54c4382534f0c894434deca5eb89cd02661d6feb.tar.bz2 |
[gdb/testsuite] Fix check-read1 FAIL in attach-many-short-lived-threads.exp
When running test-case gdb.threads/attach-many-short-lived-threads.exp with
check-read1, I ran into:
...
FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: \
no new threads (timeout)
...
Fix this by rewriting the gdb_test_multiple call using -lbl and exp_continue.
Tested on x86_64-linux, with make targets check and check-read1.
gdb/testsuite/ChangeLog:
2020-03-14 Tom de Vries <tdevries@suse.de>
* gdb.threads/attach-many-short-lived-threads.exp: Read "info threads"
result in line-by-line fashion.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a9c2852..520e453 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-03-14 Tom de Vries <tdevries@suse.de> + * gdb.threads/attach-many-short-lived-threads.exp: Read "info threads" + result in line-by-line fashion. + +2020-03-14 Tom de Vries <tdevries@suse.de> + * lib/gdb.exp (supports_statement_frontiers): New proc. * gdb.cp/step-and-next-inline.exp: Use supports_statement_frontiers. diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp index 9a08e57..1301434 100644 --- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp +++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp @@ -108,12 +108,18 @@ proc test {} { sleep 1 set test "no new threads" - gdb_test_multiple "info threads" $test { - -re "New .*$gdb_prompt $" { - fail $test + set status 1 + gdb_test_multiple "info threads" $test -lbl { + -re "\r\n\[^\r\n\]*New " { + set status 0 + exp_continue } - -re "$gdb_prompt $" { - pass $test + -re -wrap "" { + if { $status == 1 } { + pass $gdb_test_name + } else { + fail $gdb_test_name + } } } |