mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
gdb/testsuite: Remove duplicates from gdb.base/shlib-call.exp
When I run the testsuite, I have: Running .../gdb/testsuite/gdb.base/shlib-call.exp ... DUPLICATE: gdb.base/shlib-call.exp: print g DUPLICATE: gdb.base/shlib-call.exp: set print sevenbit-strings DUPLICATE: gdb.base/shlib-call.exp: set print address off DUPLICATE: gdb.base/shlib-call.exp: set width 0 DUPLICATE: gdb.base/shlib-call.exp: continue until exit Fix by adjusting the test names when required, and by removing un-necessary commands. While at it, do some cleanup: - Replace an explicit GDB restart sequence with a call to clean_restart. - Remove trailing whitespaces. - Use $gdb_test_name in gdb_test_multiple. Tested on x86_64-linux.
This commit is contained in:
@ -60,10 +60,6 @@ clean_restart ${binfile}
|
||||
gdb_load_shlib $lib1
|
||||
gdb_load_shlib $lib2
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
||||
|
||||
if ![runto_main] then {
|
||||
perror "C function calling tests suppressed"
|
||||
@ -90,7 +86,7 @@ if ![gdb_skip_stdio_test "next over shr1"] {
|
||||
|
||||
|
||||
#print g
|
||||
gdb_test "print g" "\[0-9\]* = 2"
|
||||
gdb_test "print g" "\[0-9\]* = 2" "print g two"
|
||||
|
||||
#print shr1(1)
|
||||
if ![gdb_skip_stdio_test "print shr1(1)"] {
|
||||
@ -137,7 +133,7 @@ gdb_test "print mainshr1(1)" "\[0-9\]* = 2" \
|
||||
# behavior will differ depending upon upon whether or not
|
||||
# the compiler emits line number information for the epilogue.
|
||||
gdb_test_multiple "step" "step out of shr2 to main" {
|
||||
-re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" {
|
||||
-re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" {
|
||||
pass "step out of shr2 to main"
|
||||
}
|
||||
-re ".*\\\}.*$gdb_prompt $" {
|
||||
@ -152,7 +148,7 @@ gdb_test_multiple "step" "step out of shr2 to main" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#print mainshr1(1)
|
||||
gdb_test "print mainshr1(1)" "\[0-9\]* = 2"
|
||||
|
||||
@ -162,14 +158,7 @@ gdb_test "step" "mainshr1 \\(g=4\\) at.*return 2.g;" \
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
# PR's 16495, 18213
|
||||
# test that we can re-set breakpoints in shared libraries
|
||||
@ -179,7 +168,7 @@ set test "run to bp in shared library"
|
||||
gdb_run_cmd
|
||||
gdb_test_multiple "" $test {
|
||||
-re "Breakpoint .,.*${gdb_prompt} " {
|
||||
pass $test
|
||||
pass $gdb_test_name
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,8 +178,8 @@ set test "re-run to bp in shared library (PR's 16495, 18213)"
|
||||
gdb_run_cmd
|
||||
gdb_test_multiple "" $test {
|
||||
-re "Breakpoint .,.*${gdb_prompt} " {
|
||||
pass $test
|
||||
pass $gdb_test_name
|
||||
}
|
||||
}
|
||||
|
||||
gdb_continue_to_end "" continue 1
|
||||
gdb_continue_to_end "after re-run" continue 1
|
||||
|
Reference in New Issue
Block a user