Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: Michael Chastain <mec.gnu@mindspring.com>,
	gdb-patches@sources.redhat.com, gilliam@us.ibm.com
Subject: Re: [RFC] New thread testcase.
Date: Thu, 12 Aug 2004 00:26:00 -0000	[thread overview]
Message-ID: <411AB934.5070602@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0408091818400.18782@lazy>

Hello Manoj,

> #
> # step through the thread function.
> #
> send_gdb "step\n"
> gdb_expect {
>     -re "39.*sprintf.* .*\r\n$gdb_prompt $" {
>         pass "step to next instruction in tf";
>     }
>     -re ".*$gdb_prompt $" {
>         fail "step to next instruction in tf";
>         return 1;
>     }
>     timeout {
>         fail "step to next instruction in tf (timeout)";
>         return 1;
>     }
> }

This will probably work as written, but it hints at a faulty
assumption that might lead it to break if the test is modified
in the future.

When you say "step", you allow the opportunity for the inferior
to switch thread contexts.  At present there are only two threads,
and no other breakpoints exist that might be hit, but if that were
not the case, the next stop event could be at another breakpoint,
in another thread.  This would not be a bug, and should not cause
a fail.  It's expected behavior.

I suppose this could be addressed with a comment, warning the
future maintainer to take it into consideration if more threads
or breakpoints are added.

But like Andrew, I would also like to know what the expected
failure is -- what used to happen before the kernel bug was
fixed?  A comment explaining that would be welcome too.

Michael Snyder



      parent reply	other threads:[~2004-08-12  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 22:18 [patch/testsuite/mi/copyright] gdb.mi/mi2-*.exp: update copyright years Michael Chastain
2004-08-10  6:10 ` [RFC] New thread testcase Manoj Iyer
2004-08-10  7:24   ` Michael Chastain
2004-08-10 15:13     ` Andrew Cagney
2004-08-10 20:22       ` Manoj Iyer
2004-08-10 20:33         ` Andrew Cagney
2004-08-10 20:44           ` Manoj Iyer
2004-08-12 16:04             ` Andrew Cagney
2004-08-27  3:25             ` Michael Snyder
2004-08-27 13:48               ` Manoj Iyer
2004-08-10 20:13     ` Manoj Iyer
2004-08-12  0:26   ` Michael Snyder [this message]

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=411AB934.5070602@redhat.com \
    --to=msnyder@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gilliam@us.ibm.com \
    --cc=manjo@austin.ibm.com \
    --cc=mec.gnu@mindspring.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