Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add mi-threads-interrupt.exp test (PR 20039)
Date: Wed, 04 May 2016 18:04:00 -0000	[thread overview]
Message-ID: <572A399C.60902@ericsson.com> (raw)
In-Reply-To: <f49d623b-801a-73f1-6219-353ba2cf655c@redhat.com>

On 16-05-04 05:20 AM, Pedro Alves wrote:
> On 05/03/2016 10:57 PM, Pedro Alves wrote:
>> AFAICS, the test relies on "set mi-async off".  Could you make sure that
>> if you run it against a board file that forces that on, the test either
>> passes (probably with -exec-interrupt in async mode) or is skipped?
>> See mi_detect_async and the async global.
> 
> Woke up this morning realizing that I hadn't done this for so long
> myself that I had forgotten how I used to do it.  We don't really
> need a board file -- as described in the TestingGDB wiki page [1], 
> we can use GDBFLAGS from the command line for this:
> 
>  $ make check RUNTESTFLAGS="GDBFLAGS='-ex set\ mi-async\ on'" TESTS="gdb.mi/mi-threads-interrupt.exp"
>  ...
>  FAIL: gdb.mi/mi-threads-interrupt.exp: interrupt #1 (unknown output after running)
>  FAIL: gdb.mi/mi-threads-interrupt.exp: continue #2
> 
> [1] https://sourceware.org/gdb/wiki/TestingGDB
> 
> Thanks,
> Pedro Alves
> 

Why would it make sense to set async on in a board file?  My understanding is
that the board file defines the debug target side of things, but the fact that MI
is sync or async (or that we use MI at all) is not decided by the debug target.

I would think that it's up to the tests to set async however they want it,
depending on what they test.  In this particular case, wouldn't it be better
to run both the test in sync and async modes, as we do often for non-stop?

So, for example:

proc test_continue_interrupt { async } {
  with_test_prefix "async=$async" {
    ...
  }
}

foreach async {on off} {
  test_continue_interrupt $async
}

It hacked the test quickly, and it shouldn't be too hard to do.

Thanks,

Simon


  reply	other threads:[~2016-05-04 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 20:00 Simon Marchi
2016-05-03 21:57 ` Pedro Alves
2016-05-03 21:59   ` Pedro Alves
2016-05-03 22:04   ` Pedro Alves
2016-05-04  9:20   ` Pedro Alves
2016-05-04 18:04     ` Simon Marchi [this message]
2016-05-04 19:27       ` Pedro Alves
2016-05-04 14:34   ` Simon Marchi
2016-05-04 15:07     ` 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=572A399C.60902@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --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