[01/29] gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp

Message ID 20211121175636.779325-2-lsix@lancelotsix.com
State New
Headers show
Series
  • Remove DUPLICATEs from testsuite/gdb.base/*.exp
Related show

Commit Message

Mike Frysinger via Gdb-patches Nov. 21, 2021, 5:56 p.m.
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.
---
 gdb/testsuite/gdb.base/stack-checking.exp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.33.1

Patch

diff --git a/gdb/testsuite/gdb.base/stack-checking.exp b/gdb/testsuite/gdb.base/stack-checking.exp
index ca66617009f..634e4be2e6b 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 "breakpoint for $name"
+	gdb_test "bt" "#${main_frame_number}.*in main ().*"
+    }
 }
 
 gdb_breakpoint [gdb_get_line_number "set breakpoint here"]