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.
This commit is contained in:
parent
58e8570aab
commit
405e54e994
2 changed files with 15 additions and 2 deletions
|
@ -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>
|
2011-11-01 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* gdb.base/maint.exp: XFAIL "maint info sections DATA" on MinGW as
|
* gdb.base/maint.exp: XFAIL "maint info sections DATA" on MinGW as
|
||||||
|
|
|
@ -576,7 +576,7 @@ proc mi_gdb_test { args } {
|
||||||
global verbose
|
global verbose
|
||||||
global mi_gdb_prompt
|
global mi_gdb_prompt
|
||||||
global GDB expect_out
|
global GDB expect_out
|
||||||
global inferior_exited_re thread_selected_re breakpoint_re
|
global inferior_exited_re async
|
||||||
upvar timeout timeout
|
upvar timeout timeout
|
||||||
|
|
||||||
set command [lindex $args 0]
|
set command [lindex $args 0]
|
||||||
|
@ -651,6 +651,11 @@ proc mi_gdb_test { args } {
|
||||||
set tmt 60;
|
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\[ \]*)"
|
verbose -log "Expecting: ^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)"
|
||||||
gdb_expect $tmt {
|
gdb_expect $tmt {
|
||||||
-re "\\*\\*\\* DOSEXIT code.*" {
|
-re "\\*\\*\\* DOSEXIT code.*" {
|
||||||
|
@ -668,7 +673,7 @@ proc mi_gdb_test { args } {
|
||||||
gdb_start
|
gdb_start
|
||||||
set result -1
|
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.
|
# At this point, $expect_out(1,string) is the MI input command.
|
||||||
# and $expect_out(2,string) is the MI output 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.
|
# If $expect_out(1,string) is "", then there was no MI input command here.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue