aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-11-21 01:33:13 +0000
committerLancelot SIX <lsix@lancelotsix.com>2022-01-07 22:43:33 +0000
commit5bdd79dff95269a7bf6428c449c1cfd5eab0c3ae (patch)
tree05734a2bfc18abd851472e5441cdc68eec8771ca
parentd95edb60be9f66cb4797130c8902bf5814b19448 (diff)
downloadbinutils-5bdd79dff95269a7bf6428c449c1cfd5eab0c3ae.zip
binutils-5bdd79dff95269a7bf6428c449c1cfd5eab0c3ae.tar.gz
binutils-5bdd79dff95269a7bf6428c449c1cfd5eab0c3ae.tar.bz2
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.
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp25
1 files changed, 7 insertions, 18 deletions
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 699d912..6c766e1 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -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