public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite/gdb.base/break.exp: split test_break_nonexistent_line
@ 2022-11-24 15:23 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2022-11-24 15:23 UTC (permalink / raw)
  To: gdb-cvs

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

commit 750375dd6900d28dde851032c34ce2589fb6d9c0
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Wed Nov 23 13:39:56 2022 -0500

    gdb/testsuite/gdb.base/break.exp: split test_break_nonexistent_line
    
    Change-Id: I4390dd5da23bae83ccc513ad0de0169ddff7df12
    Approved-By: Kevin Buettner <kevinb@redhat.com>

Diff:
---
 gdb/testsuite/gdb.base/break.exp | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index b4d12cb56a9..a5ef521a4b0 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -496,11 +496,21 @@ gdb_continue_to_end
 
 # Verify that GDB responds gracefully when asked to set a breakpoint
 # on a nonexistent source line.
-#
-gdb_test_no_output "set breakpoint pending off"
-gdb_test "break 999" \
-    "No line 999 in the current file." \
-    "break on non-existent source line"
+
+proc_with_prefix test_break_nonexistent_line {} {
+    clean_restart break
+
+    if ![runto_main] then {
+	return
+    }
+
+    gdb_test_no_output "set breakpoint pending off"
+    gdb_test "break 999" \
+	"No line 999 in the current file." \
+	"break on non-existent source line"
+}
+
+test_break_nonexistent_line
 
 proc_with_prefix test_break_default {} {
     clean_restart break

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

only message in thread, other threads:[~2022-11-24 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 15:23 [binutils-gdb] gdb/testsuite/gdb.base/break.exp: split test_break_nonexistent_line Simon Marchi

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).