From: Lancelot SIX Date: Fri, 19 Nov 2021 18:58:04 +0000 (+0000) Subject: gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c1f0c735d69d8e06003f5344d4a19b4320f10d8;p=binutils-gdb.git gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp When running the testsuite I have: Running .../gdb/testsuite/gdb.base/stack-checking.exp ... DUPLICATE: gdb.base/stack-checking.exp: bt DUPLICATE: gdb.base/stack-checking.exp: bt Fix by using with_test_prefix. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.base/stack-checking.exp b/gdb/testsuite/gdb.base/stack-checking.exp index 3d2cfd91416..9f85302f13c 100644 --- a/gdb/testsuite/gdb.base/stack-checking.exp +++ b/gdb/testsuite/gdb.base/stack-checking.exp @@ -31,8 +31,10 @@ if ![runto_main] then { # Test that the debugger is able to unwind to "main" at the next breakpoint # hit. The frame number of "main" should be passed into MAIN_FRAME_NUMBER." proc backtrace_test {name main_frame_number} { - gdb_continue_to_breakpoint "breakpoint for $name" - gdb_test "bt" "#${main_frame_number}.*in main ().*" + with_test_prefix $name { + gdb_continue_to_breakpoint "test location" + gdb_test "bt" "#${main_frame_number}.*in main ().*" + } } gdb_breakpoint [gdb_get_line_number "set breakpoint here"]