public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: tests: mark async unsupported dynamically
Date: Thu, 25 Jun 2015 11:21:00 -0000	[thread overview]
Message-ID: <20150625112117.GR17734@vapier> (raw)
In-Reply-To: <558A93BA.4030205@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

On 24 Jun 2015 12:25, Pedro Alves wrote:
> On 06/20/2015 04:17 AM, Mike Frysinger wrote:
> > There are many targets which do not support asynchronous execution.
> > Rather than having the async tests mark them as FAIL, use UNSUPPORTED
> > as that better represents the state.
> > ---
> > 2015-06-19  Mike Frysinger  <vapier@gentoo.org>
> > 
> > 	* gdb.base/async.exp (test_background): Call unsupported when async
> > 	isn't supported.
> > 
> >  gdb/testsuite/gdb.base/async.exp | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp
> > index 2d3fb73..4b9168a 100644
> > --- a/gdb/testsuite/gdb.base/async.exp
> > +++ b/gdb/testsuite/gdb.base/async.exp
> > @@ -58,6 +58,9 @@ proc test_background {command before_prompt after_prompt {message ""}} {
> >  	-re "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\.\r\n" {
> >  	    pass "$message"
> >  	}
> > +	-re "Asynchronous execution not supported on this target\.\r\n" {
> > +	    unsupported "$message"
> > +	}
> >  	-re "$gdb_prompt.*completed\.\r\n" {
> >  	    fail "$message"
> >  	}
> > 
> 
> We should also return something that the caller checks to bail the
> rest of the file.  Otherwise, as soon as we add something to the
> test that expects that e.g., "print foo" returns some value after the
> previous async commands worked, that test will fail on sync targets.

returning an error on unsupported makes sense.  but if we fail in general, don't 
want to run all tests and such still ?
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-06-25 11:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-20  3:17 Mike Frysinger
2015-06-24 11:25 ` Pedro Alves
2015-06-25 11:21   ` Mike Frysinger [this message]
2015-06-25 13:38     ` Pedro Alves

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=20150625112117.GR17734@vapier \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).