Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Marek Polacek <mpolacek@redhat.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb.mi/mi-nonstop.exp: fix racy tests (PR testsuite/12649)
Date: Thu, 26 May 2011 16:24:00 -0000	[thread overview]
Message-ID: <m34o4h1ldc.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4DD4F3B7.2070003@redhat.com> (Marek Polacek's message of "Thu,	19 May 2011 12:40:55 +0200")

>>>>> "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>  }

It seems wrong to me to have a 'fail' without a corresponding 'pass'.

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>  }

And likewise a pass without a fail.

Tom


  reply	other threads:[~2011-05-26 16:24 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 [this message]
2011-05-26 16:32   ` Pedro Alves
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=m34o4h1ldc.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mpolacek@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