From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>, Marek Polacek <mpolacek@redhat.com>
Subject: Re: [PATCH] gdb.mi/mi-nonstop.exp: fix racy tests (PR testsuite/12649)
Date: Thu, 26 May 2011 16:32:00 -0000 [thread overview]
Message-ID: <201105261732.05437.pedro@codesourcery.com> (raw)
In-Reply-To: <m34o4h1ldc.fsf@fleche.redhat.com>
> >>>>> "Marek" == Marek Polacek <mpolacek@redhat.com> writes:
>
> Marek> 2011-05-19 Marek Polacek <mpolacek@redhat.com>
> Marek> * gdb.mi/mi-nonstop.exp: Use the send_gdb+gdb_expect or mi_gdb_test
> Marek> instead of the gdb_test_multiple.
>
> Marek> set supported 0
> Marek> -gdb_test_multiple "-gdb-show non-stop" "" {
> Marek> - -re ".*\\^done,value=\"off\",supported=\"(\[^\"\]+)\"\r\n$mi_gdb_prompt$" {
> Marek> +send_gdb "-gdb-show non-stop\n"
> Marek> +gdb_expect {
> Marek> + -re "\\^done,value=\"off\",supported=\"(\[^\"\]+)\"\r\n$mi_gdb_prompt$" {
> Marek> if { $expect_out(1,string) == "1" } {
> Marek> set supported 1
> Marek> }
> Marek> }
> Marek> + -re "\\^done,value=\"off\"\r\n$mi_gdb_prompt$" {
> Marek> + }
> Marek> -re ".*$mi_gdb_prompt$" {
> Marek> + fail "-gdb-show non-stop"
> Marek> }
> Marek> }
This pattern appears in all the MI non-stop tests. It'd be nice
to move it to mi-support.exp (ideally in a preparatory patch
that just does the factoring/moving, and nothing else.)
>
> Marek> -gdb_test_multiple "-exec-interrupt --thread 1" "interrupted" {
> Marek> +send_gdb "-exec-interrupt --thread 1\n"
> Marek> +gdb_expect {
> Marek> -re "\\^done\r\n$mi_gdb_prompt\\*stopped\[^\r\n\]+\r\n$" {
> Marek> pass "interrupted"
> Marek> }
> Marek> }
Can you use gdb_mi_expect_interrupt (+mi_gdb_test)? See mi-nsinterall.exp.
--
Pedro Alves
next prev parent reply other threads:[~2011-05-26 16:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 10:41 Marek Polacek
2011-05-26 16:24 ` Tom Tromey
2011-05-26 16:32 ` Pedro Alves [this message]
2011-05-27 11:20 ` Marek Polacek
2011-05-27 11:46 ` Marek Polacek
2011-05-27 12:08 ` Pedro Alves
2011-05-27 12:49 ` Marek Polacek
2011-05-27 17:55 ` Tom Tromey
2011-05-27 17:56 ` Marek Polacek
2011-05-27 14:07 ` Marek Polacek
2011-05-27 14:14 ` Pedro Alves
2011-05-27 14:18 ` Marek Polacek
2011-05-27 10:58 ` Marek Polacek
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=201105261732.05437.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=mpolacek@redhat.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