gdb/testsuite: Remove duplicates from gdb.base/stack-checking.exp
authorLancelot SIX <lsix@lancelotsix.com>
Fri, 19 Nov 2021 18:58:04 +0000 (18:58 +0000)
committerLancelot SIX <lsix@lancelotsix.com>
Fri, 7 Jan 2022 22:43:32 +0000 (22:43 +0000)
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

index 3d2cfd914167f69cc1b6a5b760dfb6d1290db592..9f85302f13c3f94c17d9cf4016fb3bb0a2e20cd0 100644 (file)
@@ -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"]