diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-11-01 20:00:01 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-11-01 20:00:01 +0000 |
commit | 405e54e9944dcdcea88518f8d9bdbeff6752d78f (patch) | |
tree | f315ebd007fc57c4fff132fa0dc99c6977c9b1f5 /gdb | |
parent | 58e8570aabfeb4e0e21f376d260b8ae26761ff1f (diff) | |
download | gdb-405e54e9944dcdcea88518f8d9bdbeff6752d78f.zip gdb-405e54e9944dcdcea88518f8d9bdbeff6752d78f.tar.gz gdb-405e54e9944dcdcea88518f8d9bdbeff6752d78f.tar.bz2 |
gdb/testsuite/
Fix racy FAILs.
* lib/mi-support.exp (mi_gdb_test): Replace thread_selected_re and
breakpoint_re globals import by async. Set string_regex to .* for
async. Remove the optional thread_selected_re and breakpoint_re
globals expectations.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8f275c6..ba24a37 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-11-01 Jan Kratochvil <jan.kratochvil@redhat.com> + + Fix racy FAILs. + * lib/mi-support.exp (mi_gdb_test): Replace thread_selected_re and + breakpoint_re globals import by async. Set string_regex to .* for + async. Remove the optional thread_selected_re and breakpoint_re + globals expectations. + 2011-11-01 Joseph Myers <joseph@codesourcery.com> * gdb.base/maint.exp: XFAIL "maint info sections DATA" on MinGW as diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index fd57de1..d729c4b 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -576,7 +576,7 @@ proc mi_gdb_test { args } { global verbose global mi_gdb_prompt global GDB expect_out - global inferior_exited_re thread_selected_re breakpoint_re + global inferior_exited_re async upvar timeout timeout set command [lindex $args 0] @@ -651,6 +651,11 @@ proc mi_gdb_test { args } { set tmt 60; } } + if {$async} { + # With $prompt_re "" there may come arbitrary asynchronous response + # from the previous command, before or after $string_regex. + set string_regex ".*" + } verbose -log "Expecting: ^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" gdb_expect $tmt { -re "\\*\\*\\* DOSEXIT code.*" { @@ -668,7 +673,7 @@ proc mi_gdb_test { args } { gdb_start set result -1 } - -re "^(?:$thread_selected_re|$breakpoint_re)*($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" { + -re "^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" { # At this point, $expect_out(1,string) is the MI input command. # and $expect_out(2,string) is the MI output command. # If $expect_out(1,string) is "", then there was no MI input command here. |