mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
Fix races in mi2-basics.exp.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2011-06-23 Marek Polacek <mpolacek@redhat.com>
|
||||||
|
|
||||||
|
* gdb.mi/mi2-basics.exp: Fix races. Honour the
|
||||||
|
`test_exec_and_symbol_mi_operatons' return value.
|
||||||
|
(test_mi_interpreter_selection): Use mi_gdb_test instead of
|
||||||
|
gdb_test_multiple.
|
||||||
|
(test_exec_and_symbol_mi_operatons): Likewise.
|
||||||
|
(test_path_specification): Likewise.
|
||||||
|
|
||||||
2011-06-23 Yao Qi <yao@codesourcery.com>
|
2011-06-23 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* gdb.base/moribund-step.exp: Skip test if displaced stepping is not
|
* gdb.base/moribund-step.exp: Skip test if displaced stepping is not
|
||||||
|
@ -60,18 +60,10 @@ proc test_mi_interpreter_selection {} {
|
|||||||
|
|
||||||
# All this test expects is to get the prompt back
|
# All this test expects is to get the prompt back
|
||||||
# with no syntax error message
|
# with no syntax error message
|
||||||
gdb_test_multiple "-gdb-version" "acceptance of MI operations" {
|
if ![mi_gdb_test "-gdb-version" "~\"GNU gdb.*" "acceptance of MI operations"] {
|
||||||
-re "GNU gdb .*\r\n$mi_gdb_prompt$" {
|
return 1
|
||||||
pass "acceptance of MI operations"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
-re ".*\r\n$mi_gdb_prompt$" {
|
|
||||||
fail "acceptance of MI operations"
|
|
||||||
}
|
|
||||||
-re "Undefined command.*$gdb_prompt $" {
|
|
||||||
fail "acceptance of MI operations"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
note "Skipping all other MI tests."
|
note "Skipping all other MI tests."
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -84,19 +76,11 @@ proc test_exec_and_symbol_mi_operatons {} {
|
|||||||
# Tests:
|
# Tests:
|
||||||
# -file-exec-and-symbols
|
# -file-exec-and-symbols
|
||||||
|
|
||||||
# Can't use mi_gdb_test as if this doesn't work,
|
if [mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\\^done" \
|
||||||
# we must give up on the whole test file
|
"file-exec-and-symbols operation"] {
|
||||||
gdb_test_multiple "-file-exec-and-symbols ${binfile}" \
|
note "Skipping all other MI tests."
|
||||||
"file-exec-and-symbols operation" {
|
return 0
|
||||||
-re "\[\r\n\]*\\\^done\r\n$mi_gdb_prompt$" {
|
}
|
||||||
pass "file-exec-and-symbols operation"
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
fail "file-exec-and-symbols operation (timeout)"
|
|
||||||
note "Skipping all other MI tests."
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# The following is not used by mi-support.exp, but we test here so
|
# The following is not used by mi-support.exp, but we test here so
|
||||||
# we get done with loading a program basics.
|
# we get done with loading a program basics.
|
||||||
@ -121,7 +105,8 @@ proc test_exec_and_symbol_mi_operatons {} {
|
|||||||
"\\\^done" \
|
"\\\^done" \
|
||||||
"file-symbol-file operation"
|
"file-symbol-file operation"
|
||||||
|
|
||||||
# FIXME: if we cannot load we have to skip all other tests.
|
# We need to return != 0.
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_breakpoints_deletion {} {
|
proc test_breakpoints_deletion {} {
|
||||||
@ -201,6 +186,7 @@ proc test_path_specification {} {
|
|||||||
global subdir
|
global subdir
|
||||||
global escapedobjdir
|
global escapedobjdir
|
||||||
global envirodir
|
global envirodir
|
||||||
|
global expect_out
|
||||||
|
|
||||||
# Add to the path, display, then reset
|
# Add to the path, display, then reset
|
||||||
# Tests:
|
# Tests:
|
||||||
@ -209,15 +195,8 @@ proc test_path_specification {} {
|
|||||||
# -environment-path -r dir
|
# -environment-path -r dir
|
||||||
# -environment-path -r
|
# -environment-path -r
|
||||||
|
|
||||||
gdb_test_multiple "-environment-path" "-environment-path" {
|
mi_gdb_test "-environment-path" "\\\^done,path=\"(.*)\"" "-environment-path"
|
||||||
-re "\\\^done,path=\"\(.*\)\"\r\n$mi_gdb_prompt" {
|
set orig_path $expect_out(3,string)
|
||||||
set orig_path $expect_out(1,string);
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
perror "-environment-path (timeout)" ;
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set orig_path [string_to_regexp ${orig_path}]
|
set orig_path [string_to_regexp ${orig_path}]
|
||||||
set pathdir [string_to_regexp ${objdir}/${subdir}]
|
set pathdir [string_to_regexp ${objdir}/${subdir}]
|
||||||
@ -240,8 +219,8 @@ proc test_path_specification {} {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [test_mi_interpreter_selection] {
|
if { [test_mi_interpreter_selection]
|
||||||
test_exec_and_symbol_mi_operatons
|
&& [test_exec_and_symbol_mi_operatons] } {
|
||||||
test_breakpoints_deletion
|
test_breakpoints_deletion
|
||||||
test_dir_specification
|
test_dir_specification
|
||||||
test_cwd_specification
|
test_cwd_specification
|
||||||
|
Reference in New Issue
Block a user