Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: [commit] Fix checkpoint.exp buffer overflow
Date: Fri, 09 Mar 2007 15:21:00 -0000	[thread overview]
Message-ID: <20070309152109.GA19189@caradoc.them.org> (raw)

Related to Ulrich's fix for all-registers yesterday; this should
prevent expect internal errors during checkpoint.exp.  I haven't seen
one since I started testing the patch.

-- 
Daniel Jacobowitz
CodeSourcery

2007-03-09  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/checkpoint.exp: Rewrite 600 checkpoint test to
	collect output incrementally.

Index: checkpoint.exp
===================================================================
RCS file: /home/gcc/repos/src/src/gdb/testsuite/gdb.base/checkpoint.exp,v
retrieving revision 1.4
diff -u -p -r1.4 checkpoint.exp
--- checkpoint.exp	9 Jan 2007 17:59:09 -0000	1.4
+++ checkpoint.exp	9 Mar 2007 13:25:11 -0000
@@ -359,8 +359,21 @@ gdb_expect {
 gdb_breakpoint $break2_loc
 gdb_test "continue" "breakpoint 2.*" "break2 with many checkpoints"
 
-gdb_test "info checkpoints" " 600 .* 0 .*" \
-    "info checkpoints with at least 600 checkpoints"
+set count 0
+set msg "info checkpoints with at least 600 checkpoints"
+gdb_test_multiple "info checkpoints" $msg {
+    -re "  $decimal process \[^\r\]*\r\n" {
+	incr count
+	exp_continue
+    }
+    -re "$gdb_prompt $" {
+	if { $count >= 600 } {
+	    pass $msg
+	} else {
+	    fail $msg
+	}
+    }
+}    
 
 #
 # OK, kill 'em all...


             reply	other threads:[~2007-03-09 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-09 15:21 Daniel Jacobowitz [this message]
2007-03-13  0:07 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070309152109.GA19189@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox