aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-03-16 10:17:07 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-03-26 14:04:18 +0000
commit3c2dcf90b55fea84260ac83ab968c5df3b44d34d (patch)
tree05900dd11cccf7c7a6c622d924425b22df5e225b /gdb/testsuite
parent6b78370dcc18719d4a34d64ab759f30643d7b8d3 (diff)
downloadgdb-3c2dcf90b55fea84260ac83ab968c5df3b44d34d.zip
gdb-3c2dcf90b55fea84260ac83ab968c5df3b44d34d.tar.gz
gdb-3c2dcf90b55fea84260ac83ab968c5df3b44d34d.tar.bz2
gdb/testsuite: resolve remaining duplicate test names in gdb.cp/*.exp
This commit resolves the remaining duplicate test names in gdb.cp/*.exp. These are all the easy duplicates, I'm either giving tests a new, unique name, extending an existing name to make it unique, or changing an existing name to better reflect what the test is actually doing, and thus, making this test name unique. There should be no change in what is tested after this commit. gdb/testsuite/ChangeLog: * gdb.cp/breakpoint.exp: Extend test names to make them unique. * gdb.cp/casts.exp: Give tests unique names. * gdb.cp/filename.exp: Likewise. * gdb.cp/gdb2495.exp: Likewise. * gdb.cp/mb-ctor.exp: Extend test names to make them unique. * gdb.cp/misc.exp: Rename test to make it unique. * gdb.cp/nsnested.exp: Give tests unique names. * gdb.cp/ovldbreak.exp: Likewise. * gdb.cp/pr17494.exp: Rename test to reflect what is actually being tested. This also removes the duplicate test name. * gdb.cp/ref-types.exp: Likewise. * gdb.cp/temargs.exp: Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog15
-rw-r--r--gdb/testsuite/gdb.cp/breakpoint.exp8
-rw-r--r--gdb/testsuite/gdb.cp/casts.exp6
-rw-r--r--gdb/testsuite/gdb.cp/filename.exp6
-rw-r--r--gdb/testsuite/gdb.cp/gdb2495.exp6
-rw-r--r--gdb/testsuite/gdb.cp/mb-ctor.exp4
-rw-r--r--gdb/testsuite/gdb.cp/misc.exp2
-rw-r--r--gdb/testsuite/gdb.cp/nsnested.exp9
-rw-r--r--gdb/testsuite/gdb.cp/ovldbreak.exp6
-rw-r--r--gdb/testsuite/gdb.cp/pr17494.exp2
-rw-r--r--gdb/testsuite/gdb.cp/ref-types.exp2
-rw-r--r--gdb/testsuite/gdb.cp/temargs.exp2
12 files changed, 47 insertions, 21 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9301efe..d0fce59 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,20 @@
2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb.cp/breakpoint.exp: Extend test names to make them unique.
+ * gdb.cp/casts.exp: Give tests unique names.
+ * gdb.cp/filename.exp: Likewise.
+ * gdb.cp/gdb2495.exp: Likewise.
+ * gdb.cp/mb-ctor.exp: Extend test names to make them unique.
+ * gdb.cp/misc.exp: Rename test to make it unique.
+ * gdb.cp/nsnested.exp: Give tests unique names.
+ * gdb.cp/ovldbreak.exp: Likewise.
+ * gdb.cp/pr17494.exp: Rename test to reflect what is actually
+ being tested. This also removes the duplicate test name.
+ * gdb.cp/ref-types.exp: Likewise.
+ * gdb.cp/temargs.exp: Likewise.
+
+2021-03-26 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
square brackets in test.
diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp
index 3f2e822..e98b79e 100644
--- a/gdb/testsuite/gdb.cp/breakpoint.exp
+++ b/gdb/testsuite/gdb.cp/breakpoint.exp
@@ -51,10 +51,10 @@ set bp_location1 [gdb_get_line_number "conditional breakpoint in method"]
set bp_location2 [gdb_get_line_number "conditional breakpoint in method 2"]
gdb_test "break $bp_location1 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method"
gdb_test "break $bp_location2 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method 2"
-gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint"
-gdb_test "print i_" "\\\$1 = 3" "check the member variable"
-gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint"
-gdb_test "print i_" "\\\$2 = 3" "check the member variable"
+gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint in C1::foo"
+gdb_test "print i_" "\\\$1 = 3" "check the member variable from within C1::foo"
+gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint in C1::bar"
+gdb_test "print i_" "\\\$2 = 3" "check the member variable from within C1::bar"
gdb_exit
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index beb3c94..7bd879c 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -43,7 +43,8 @@ if ![runto_main] then {
}
# Prevent symbol on address 0x0 being printed.
-gdb_test_no_output "set print symbol off"
+gdb_test_no_output "set print symbol off" \
+ "turn of symbol printing for the first time"
gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
"Breakpoint.*at.* file .*" \
@@ -184,7 +185,8 @@ if ![runto_main] then {
}
# Prevent symbol on address 0x0 being printed.
-gdb_test_no_output "set print symbol off"
+gdb_test_no_output "set print symbol off" \
+ "turn of symbol printing for the second time"
gdb_breakpoint [gdb_get_line_number "casts.exp: 1" $srcfile2]
gdb_continue_to_breakpoint "end of casts03"
diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp
index bf12ac6..3a2e9bd 100644
--- a/gdb/testsuite/gdb.cp/filename.exp
+++ b/gdb/testsuite/gdb.cp/filename.exp
@@ -31,14 +31,16 @@ gdb_continue_to_breakpoint "stop inside C"
gdb_test "print includefile\[0\]" " = 23"
gdb_test "print this->includefile\[0\]" " = 23"
-gdb_test "print 'includefile'::some_global" " = 27"
+gdb_test "print 'includefile'::some_global" " = 27" \
+ "print some_global from within C"
gdb_breakpoint [gdb_get_line_number "stop inside D"]
gdb_continue_to_breakpoint "stop inside D"
gdb_test "print includefile()" " = 24"
gdb_test "print this->includefile()" " = 24"
-gdb_test "print 'includefile'::some_global" " = 27"
+gdb_test "print 'includefile'::some_global" " = 27" \
+ "print some_global from within D"
gdb_breakpoint [gdb_get_line_number "stop outside"]
gdb_continue_to_breakpoint "stop outside"
diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp
index a52368f..5eb13ac 100644
--- a/gdb/testsuite/gdb.cp/gdb2495.exp
+++ b/gdb/testsuite/gdb.cp/gdb2495.exp
@@ -122,7 +122,8 @@ gdb_test "show unwindonsignal" \
# Check to see if new behaviour interferes with
# normal signal handling in inferior function calls.
gdb_test "p exceptions.raise_signal(1)" \
- "To change this behavior use \"set unwindonsignal off\".*"
+ "To change this behavior use \"set unwindonsignal off\".*" \
+ "check for unwindonsignal off message"
# And reverse - turn off again.
gdb_test_no_output "set unwindonsignal off"
@@ -135,4 +136,5 @@ gdb_test "show unwindonsignal" \
# Check to see if new behaviour interferes with
# normal signal handling in inferior function calls.
gdb_test "p exceptions.raise_signal(1)" \
- "To change this behavior use \"set unwindonsignal on\".*"
+ "To change this behavior use \"set unwindonsignal on\".*" \
+ "check for unwindonsignal on message"
diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp
index 9bbfb55..ae352ad 100644
--- a/gdb/testsuite/gdb.cp/mb-ctor.exp
+++ b/gdb/testsuite/gdb.cp/mb-ctor.exp
@@ -51,13 +51,13 @@ gdb_test "continue" \
".*Breakpoint.*Derived.*i=7.*" \
"run to breakpoint 1 v1"
-gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here"
+gdb_continue_to_breakpoint "set breakpoint here, first time" ".* breakpoint here"
gdb_test "continue" \
".*Breakpoint.*Derived.*i=15.*" \
"run to breakpoint 1 v2"
-gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here"
+gdb_continue_to_breakpoint "set breakpoint here, second time" ".* breakpoint here"
gdb_test "continue" \
".*Breakpoint.*~Derived.*" \
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index aa83031..8219b23 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -111,6 +111,6 @@ gdb_test "print 'misc.cc'::v_bool" " = true" \
gdb_test "print *(v_bool_array + number_ref)" "\\$\[0-9\]* = false" \
"pointer addition with integer reference"
gdb_test "print *(number_ref + v_bool_array)" "\\$\[0-9\]* = false" \
- "pointer addition with integer reference"
+ "integer reference addition with pointer"
gdb_test "print *(v_bool_array - number_ref)" "\\$\[0-9\]* = false" \
"pointer subtraction with integer reference"
diff --git a/gdb/testsuite/gdb.cp/nsnested.exp b/gdb/testsuite/gdb.cp/nsnested.exp
index 965dead..4e5bd5e 100644
--- a/gdb/testsuite/gdb.cp/nsnested.exp
+++ b/gdb/testsuite/gdb.cp/nsnested.exp
@@ -25,17 +25,20 @@ if ![runto_main] then {
continue
}
-gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context." \
+ "ensure symbol ab is not known in main"
############################################
gdb_breakpoint C::first
gdb_continue_to_breakpoint "C::first"
-gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context." \
+ "ensure symbol ab is not known in C::first"
gdb_test "print C::D::ab" "= 11"
############################################
gdb_breakpoint C::D::second
gdb_continue_to_breakpoint "C::D::second"
-gdb_test "print ab" "= 11"
+gdb_test "print ab" "= 11" \
+ "ensure symbol ab is known in C::D::second"
diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp
index 1a61c7d..ca04d49 100644
--- a/gdb/testsuite/gdb.cp/ovldbreak.exp
+++ b/gdb/testsuite/gdb.cp/ovldbreak.exp
@@ -388,13 +388,15 @@ foreach type $all_types {
# is set to "cancel"
gdb_test_no_output "set multiple-symbols cancel"
gdb_test "break foo::foofunc" \
- "canceled.*"
+ "canceled.*" \
+ "break on ambiguous symbol when multiple-symbols is set to cancel"
# Test breaking on an overloaded function when multiple-symbols
# is set to "all"
gdb_test_no_output "set multiple-symbols all"
gdb_test "break foo::foofunc" \
- "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*"
+ "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*" \
+ "break on ambiguous symbol when multiple-symbols is set to all"
# That's all, folks.
diff --git a/gdb/testsuite/gdb.cp/pr17494.exp b/gdb/testsuite/gdb.cp/pr17494.exp
index 127978b..066c463 100644
--- a/gdb/testsuite/gdb.cp/pr17494.exp
+++ b/gdb/testsuite/gdb.cp/pr17494.exp
@@ -31,7 +31,7 @@ gdb_breakpoint [gdb_get_line_number "Break here"]
gdb_continue_to_breakpoint "Break here"
gdb_test "p a.geta()" ".* = 12345" "a.geta()"
-gdb_test "p a_ptr->geta()" ".* = 12345" "a.geta()"
+gdb_test "p a_ptr->geta()" ".* = 12345" "a_ptr->geta()"
gdb_test "p false ? a.geta() : 123" ".* = 123" "ternop 1"
gdb_test "p false ? a_ptr->geta() : 123" ".* = 123" "ternop 2"
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp
index e38aad4..9bd93f3 100644
--- a/gdb/testsuite/gdb.cp/ref-types.exp
+++ b/gdb/testsuite/gdb.cp/ref-types.exp
@@ -242,7 +242,7 @@ gdb_test "print rI" ".\[0-9\]* = \\(int &\\) @$hex: 102" \
gdb_test "print rUI" \
".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002" \
- "print value of UI"
+ "print value of rUI"
gdb_test_multiple "print rL" "print value of rL" {
-re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp
index f372cc3..58c3c0a 100644
--- a/gdb/testsuite/gdb.cp/temargs.exp
+++ b/gdb/testsuite/gdb.cp/temargs.exp
@@ -136,7 +136,7 @@ gdb_test "print I" " = 91" "test value of I in func"
# PR symtab/16842 - gdb used to crash here.
if $have_older_template_gcc { setup_xfail "*-*-*" }
-gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in templ_m"
+gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in func"
if $have_older_template_gcc { setup_xfail "*-*-*" }
gdb_test "print P == &a_global" " = true" "test value of P in func"