From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id 5559B3857C75; Fri, 7 Jan 2022 22:45:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5559B3857C75 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: Remove duplicates from gdb.base/del.exp X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: 7a6a9616113ff071fc4a4014dc827c33f3f22292 X-Git-Newrev: d60bbc70c0af7db13c98c6bbb358f9c989ce3476 Message-Id: <20220107224516.5559B3857C75@sourceware.org> Date: Fri, 7 Jan 2022 22:45:16 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2022 22:45:16 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd60bbc70c0af= 7db13c98c6bbb358f9c989ce3476 commit d60bbc70c0af7db13c98c6bbb358f9c989ce3476 Author: Lancelot SIX Date: Fri Nov 19 23:55:05 2021 +0000 gdb/testsuite: Remove duplicates from gdb.base/del.exp =20 When running the testsuite, I have: =20 Running .../gdb/testsuite/gdb.base/del.exp ... DUPLICATE: gdb.base/del.exp: info break after removing break on main =20 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. =20 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" =20 gdb_test "info break" \ "No breakpoints or watchpoints." \ - "info break after removing break on main" + "info break after clearing breakpoints" + =20 - =20 # 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)" - =20 + "breakpoint insertion" + gdb_test_no_output "$alias \$bpnum" \ - "Remove last breakpoint ($alias)" - =20 + "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" } =20 # Test various shortcut forms of the "delete" command. =20 -test_delete_alias "del" -test_delete_alias "d" - +foreach_with_prefix alias {"del" "d"} { + test_delete_alias $alias +}