]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: remove duplicate test names from gdb.cp/gdb2384.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 16 Mar 2021 10:21:40 +0000 (10:21 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 26 Mar 2021 14:04:16 +0000 (14:04 +0000)
The test gdb.cp/gdb2384.exp contains some duplicate test names, and
also some test names with a string inside parentheses at the end.  In
order to resolve the duplicates the obvious choice would be to add yet
more strings inside parentheses at the end of names, however, this is
discouraged in our test naming scheme.

The string in parentheses originates from a comment in the test source
code, which naturally leads to including this comment in the test
name.

In this commit I have changed the comment in the test source to remove
the string in parentheses, I then rename the tests in the .exp script
to match, making sure that all test names are unique.

There should be no change in test coverage after this commit.

gdb/testsuite/ChangeLog:

* gdb.cp/gdb2384.cc (main): Change comments used for breakpoints.
* gdb.cp/gdb2384.exp: Change and extend test names to avoid
duplicates, and also to avoid having a string inside parentheses
at the end of test names.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/gdb2384.cc
gdb/testsuite/gdb.cp/gdb2384.exp

index 413cd4c7f911c8edeccef5741123c4af7412b90e..3fe36b3db463159fff3cde7d1983ff8e67dc6619 100644 (file)
@@ -1,3 +1,10 @@
+2021-03-26  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb.cp/gdb2384.cc (main): Change comments used for breakpoints.
+       * gdb.cp/gdb2384.exp: Change and extend test names to avoid
+       duplicates, and also to avoid having a string inside parentheses
+       at the end of test names.
+
 2021-03-26  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.cp/nsusing.exp: Rewrite test, remove a duplicate test block.
index 7c734bd158aff638a2551ded0e22699218ce8167..07967b07a01938652eca5109e6ea5dff25e8e182 100644 (file)
@@ -46,7 +46,7 @@ main ()
 {
   derived1 d1 (42);
   derived2 d2 (24);
-  g = d1.meth (); // set breakpoint here
-  g = d2.meth (); // set breakpoint here (second)
+  g = d1.meth (); // First breakpoint
+  g = d2.meth (); // Second breakpoint
   return 0;
 }
index 69f9709f7a49cc4ff6cdfa06825ed72d65c5c6e8..db0320651862fe4d6dfea9bfc39a85633f1ad9b9 100644 (file)
@@ -49,8 +49,8 @@ if ![runto_main] then {
     return -1
 }
 
-gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
-gdb_continue_to_breakpoint "set breakpoint here"
+gdb_breakpoint [gdb_get_line_number "First breakpoint"]
+gdb_continue_to_breakpoint "run to 'First breakpoint', first time"
 
 gdb_test "print d1.meth ()" \
     ".*42.*"
@@ -58,25 +58,25 @@ gdb_test "print d1.meth ()" \
 # Now try again.  gdb's without the fix will hopefully segv here
 
 runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here"]
-gdb_continue_to_breakpoint "set breakpoint here"
+gdb_breakpoint [gdb_get_line_number "First breakpoint"]
+gdb_continue_to_breakpoint "run to 'First breakpoint', second time"
 gdb_test "print d1.meth ()" \
     ".*42.*" \
-    "gdb2384"
+    "gdb2384 at 'First breakpoint'"
 
 # second case
 
 runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here (second)"]
-gdb_continue_to_breakpoint "set breakpoint here (second)"
+gdb_breakpoint [gdb_get_line_number "Second breakpoint"]
+gdb_continue_to_breakpoint "run to 'Second breakpoint', first time"
 gdb_test "print d2.meth ()" \
     ".*24.*" \
     "print d2.meth()"
 
 runto_main
-gdb_breakpoint [gdb_get_line_number "set breakpoint here (second)"]
-gdb_continue_to_breakpoint "set breakpoint here (second)"
+gdb_breakpoint [gdb_get_line_number "Second breakpoint"]
+gdb_continue_to_breakpoint "run to 'Second breakpoint', second time"
 gdb_test "print d2.meth ()" \
     ".*24.*" \
-    "gdb2384 (second)"
+    "gdb2384 at 'Second breakpoint'"