public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: Remove duplicates from gdb.base/del.exp
@ 2022-01-07 22:45 Lancelot SIX
  0 siblings, 0 replies; only message in thread
From: Lancelot SIX @ 2022-01-07 22:45 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d60bbc70c0af7db13c98c6bbb358f9c989ce3476

commit d60bbc70c0af7db13c98c6bbb358f9c989ce3476
Author: Lancelot SIX <lsix@lancelotsix.com>
Date:   Fri Nov 19 23:55:05 2021 +0000

    gdb/testsuite: Remove duplicates from gdb.base/del.exp
    
    When running the testsuite, I have:
    
        Running .../gdb/testsuite/gdb.base/del.exp ...
        DUPLICATE: gdb.base/del.exp: info break after removing break on main
    
    Refactor slightly this test to run the various configurations under
    foreach_with_prefix so each variant is automatically prefixed, ensuring
    that the forgotten custom test name cannot happen.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.base/del.exp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.base/del.exp b/gdb/testsuite/gdb.base/del.exp
index 02f6875fa8c..29ab5f5ae40 100644
--- a/gdb/testsuite/gdb.base/del.exp
+++ b/gdb/testsuite/gdb.base/del.exp
@@ -32,30 +32,30 @@ proc test_delete_alias { alias } {
     # First of all, remove all previous breakpoints if there were any,
     # and then verify that we do not have any breakpoint lying around.
     gdb_test_no_output "delete" \
-             "remove all breakpoints ($alias)"
+             "remove all breakpoints"
 
     gdb_test "info break" \
              "No breakpoints or watchpoints." \
-             "info break after removing break on main"
+             "info break after clearing breakpoints"
+
 
-    
     # Now, insert a breakpoint at an easy location, and then remove it
     # using $alias. We verified that the removal worked by checking
     # the list of breakpoints.
     gdb_test "break -q main" \
              "Breakpoint.*at.* file .*$srcfile, line.*" \
-             "breakpoint insertion ($alias)"
-    
+             "breakpoint insertion"
+
     gdb_test_no_output "$alias \$bpnum" \
-             "Remove last breakpoint ($alias)"
-    
+             "Remove last breakpoint"
+
     gdb_test "info break" \
              "No breakpoints or watchpoints." \
-             "info break after removing break on main ($alias)"
+             "info break after removing break on main"
 }
 
 # Test various shortcut forms of the "delete" command.
 
-test_delete_alias "del"
-test_delete_alias "d"
-
+foreach_with_prefix alias {"del" "d"} {
+    test_delete_alias $alias
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-07 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 22:45 [binutils-gdb] gdb/testsuite: Remove duplicates from gdb.base/del.exp Lancelot SIX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).