Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: 'Tom Tromey' <tromey@redhat.com>,
	"'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>
Subject: Re: [MI] --thread-group test (was: RE: [MI] Duplicate --thread-group flag not detected)
Date: Fri, 10 Dec 2010 12:15:00 -0000	[thread overview]
Message-ID: <20101210121454.GB2596@adacore.com> (raw)
In-Reply-To: <F7CE05678329534C957159168FA70DEC572E8BFC0A@EUSAACMS0703.eamcs.ericsson.se>

> Do I need a PR number to use KFAIL?  I don't have one.
> I used XFAIL instead.  Is that right?

XFAIL is for the case where the problem is caused by what I call
the "environment".  In other words, it's not GDB's fault. It could
be bad debugging info, kernel bug, assember, etc...

It took me a while to find the documentation for setup_kfail, but
I confirm that bug ID must be provided with setup_kfail.

> The annoying part there, is that the tests fails on a timeout,
> so marking them XFAIL instead of commenting them out makes
> the test file take 10 seconds more...

In that case, I suggest we simply open bugs for these tests. I understand 
you are already making an effort trying to contribute this test, so I can
create the new PRs for you if you are busy.  In the meantime, let's take
these tests out.

> To be honest, I don't even need a binary for this test, I can test the 
> syntax without actually starting the inferior.  I did this in the patch
> below, but I'm not sure if this follows proper 'protocol'.  Just let me
> know.

I would be perfectly fine.

> > Do we want to test the MI command with a sequence number. I know that
> > they are allowed, but aren't they obsolete?
> 
> We heavily use them in Eclipse :-)
> And I saw that other tests use them, so I thought it would make a
> 'syntax' test more complete.

In that case, that's also a good idea.

> 2010-12-06  Marc Khouzam  <marc.khouzam@ericsson.com>
> 
> 	* gdb.mi/mi-general.exp: New file.

> +# No need to actually start the inferior as the tests below only verify MI syntax.
> +# What we do instead is see that the parsing works, and passes the MI command
> +# further down to GDB, which will then fail because we didn't start the inferior.
> +# We wouldn't make it that far if the MI syntax parsing failed

Thanks a lot for writing comments - I think they are the best feature
of any language and always find them very helpful.

Just watch out for line length, which should not exceed 78 characters.
Also, a period at the end of the last sentence is missing.

> +    # If we get to the breakpoint error, it means the -thread-group was parsed properly    

Same here... and later on as well.

> +    setup_xfail *-*-*
> +    mi_gdb_test "25-break-insert --thread-group XYZ main" \
> +             "25\\^error,msg=\"Invalid thread group id\"" \
> +             "Invalid --thread-group flag which does not start with an i"
> +
> +    setup_xfail *-*-*
> +    mi_gdb_test "36-break-insert --thread-group i1 --thread-group i2 main" \
> +             "36\\^error,msg=\"Duplicate '--thread-group' option\n\"" \
> +             "Duplicate --thread-group flag"

So, as discussed above, let's discard these in favor of opening
new PRs.

Thanks again for doing this,
-- 
Joel


      reply	other threads:[~2010-12-10 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 20:56 [MI] Duplicate --thread-group flag not detected Marc Khouzam
2010-11-26 16:39 ` Joel Brobecker
2010-12-02 16:40   ` Tom Tromey
2010-12-02 17:10     ` Joel Brobecker
2010-12-04 18:10       ` Marc Khouzam
2010-12-04 18:47         ` Joel Brobecker
2010-12-05 19:27           ` Marc Khouzam
2010-12-06 11:04             ` Joel Brobecker
2010-12-06 14:26               ` Marc Khouzam
2010-12-06 15:02               ` [MI] --thread-group test (was: RE: [MI] Duplicate --thread-group flag not detected) Marc Khouzam
2010-12-10 12:15                 ` Joel Brobecker [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=20101210121454.GB2596@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=tromey@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