From: Daniel Jacobowitz <drow@false.org>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] New thread test to exercise Daniel's Patch
Date: Mon, 29 Mar 2004 20:42:00 -0000 [thread overview]
Message-ID: <20040329204204.GA3251@nevyn.them.org> (raw)
In-Reply-To: <4068849B.7030800@redhat.com>
On Mon, Mar 29, 2004 at 03:18:35PM -0500, Jeff Johnston wrote:
> Daniel Jacobowitz wrote:
> >On Mon, Mar 29, 2004 at 01:06:07PM -0500, Jeff Johnston wrote:
> >
> >>>>+send_gdb "continue\n"
> >>>>+gdb_expect {
> >>>
> >>>
> >>>Everywhere you're using gdb_expect, please use gdb_test_multiple
> >>>instead. For the "after" tests, you can use gdb_test_multiple with
> >>>"" as the first argument.
> >>>
> >>
> >>I tried this initially but I kept getting "Error: internal buffer is
> >>full". I tried lowering the "after" time which is why it ended up 100
> >>below but that didn't solve the problem. Any suggestions on how to avoid
> >>the "full_buffer" error.
> >
> >
> >I'm not sure about the regexes, since I'm just pulling this out of the
> >top of my head, but you want something like this:
> >
> > -re "error:.*$gdb_prompt $" {
> > fail "msg"
> > }
> > -re "\\\[New thread \[^\]\]*\\\]\r\n" {
> > exp_continue
> > }
> > -re "\\\[Thread \[^\]\]* exited\\\]\r\n" {
> > exp_continue
> > }
> >
> >That will consume any thread create/delete messages, instead of leaving
> >them in the buffer.
> >
>
> Forgive my ignorance of the test macros, but how does this terminate? I
> tried doing it this way and it hangs. It never gets a gdb prompt and spits
> out endless messages because it is essentially an infinite loop. I only
> care to see the "Continuing" message and don't care about the rest of the
> stuff.
>
> I stole the original send_gdb / gdb_expect code from schedlock.exp which
> has the same problem.
Hmm, I must have misunderstood. Which part of the test gives you a
full buffer error? I'm thinking of something like this:
gdb_test_multiple "continue" {
-re "error:.*$gdb_prompt $" {
fail "msg"
}
-re "Continuing" {
pass "msg"
}
}
after 1000 { send_gdb "\003" }
gdb_test_multiple "" {
-re "error:.*$gdb_prompt $" {
fail "msg"
}
-re "$gdb_prompt $" {
pass "msg"
}
-re "\\\[New thread \[^\]\]*\\\]\r\n" {
exp_continue
}
-re "\\\[Thread \[^\]\]* exited\\\]\r\n" {
exp_continue
}
}
Those will catch any error messages and treat them as failures.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-03-29 20:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 0:36 [RFC]: fix for recycled thread ids Jeff Johnston
2004-03-19 1:53 ` Daniel Jacobowitz
2004-03-19 18:44 ` Jeff Johnston
2004-03-19 19:01 ` Daniel Jacobowitz
2004-03-19 19:35 ` Jeff Johnston
2004-03-19 19:40 ` Daniel Jacobowitz
2004-03-19 21:32 ` Jeff Johnston
2004-03-24 15:51 ` Daniel Jacobowitz
2004-03-24 16:56 ` Daniel Jacobowitz
2004-03-24 21:56 ` Jeff Johnston
2004-03-25 0:46 ` Jeff Johnston
2004-03-25 4:39 ` Daniel Jacobowitz
2004-03-25 16:34 ` Daniel Jacobowitz
2004-03-25 20:22 ` Jeff Johnston
2004-03-26 17:59 ` [patch] Use TD_DEATH and PTRACE_EVENT_CLONE when available (was: Re: [RFC]: fix for recycled thread ids) Daniel Jacobowitz
2004-03-26 18:14 ` [patch] Use TD_DEATH and PTRACE_EVENT_CLONE when available Jeff Johnston
2004-03-26 21:13 ` [patch] New thread test to exercise Daniel's Patch Jeff Johnston
2004-03-26 21:19 ` Daniel Jacobowitz
2004-03-29 18:06 ` Jeff Johnston
2004-03-29 18:11 ` Daniel Jacobowitz
2004-03-29 20:18 ` Jeff Johnston
2004-03-29 20:42 ` Daniel Jacobowitz [this message]
2004-03-29 21:04 ` Jeff Johnston
2004-03-29 21:34 ` Daniel Jacobowitz
2004-03-29 21:59 ` Jeff Johnston
2004-03-29 22:32 ` Daniel Jacobowitz
2004-03-29 22:58 ` Jeff Johnston
2004-03-29 23:57 ` Daniel Jacobowitz
2004-03-29 18:07 ` [patch] Use TD_DEATH and PTRACE_EVENT_CLONE when available (was: Re: [RFC]: fix for recycled thread ids) Daniel Jacobowitz
2004-03-19 20:33 ` [RFC]: fix for recycled thread ids Andrew Cagney
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=20040329204204.GA3251@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jjohnstn@redhat.com \
/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