Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>, Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [patch 3/3] add missing gdb_test arguments in paginate-bg-execution.exp
Date: Fri, 25 Dec 2015 19:39:00 -0000	[thread overview]
Message-ID: <567D9B51.4040901@codesourcery.com> (raw)
In-Reply-To: <20151221122750.GB5564@adacore.com>

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

On 12/21/2015 05:27 AM, Joel Brobecker wrote:
>> If it wasn't supposed to be correct, then it'd be good to add
>> an "error" call in gdb_test, to make it a hard error.
>>
>> But I think it is supposed to work.  At least
>>
>>   $ grep -rn "gdb_test "  | grep -v "\".*\".*\"" | grep -v "\\\\"
>>
>> shows many (hundreds) of instances.  With no explicit pattern,
>> we end up just matching the prompt, ignoring whatever output
>> precedes it.
>
> Yes, I confirm it is supposed to work, or at least it's been
> acknowledged to be that way for quite a while. The last time
> we discussed it is when we created gdb_test_no_output.

OK.  I think this tweak to the comments is obvious enough that I've gone 
ahead and checked it in.

-Sandra


[-- Attachment #2: gdb.log --]
[-- Type: text/x-log, Size: 167 bytes --]

2015-12-25  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* lib/gdb.exp (gdb_test): Update comments to clarify that the
	PATTERN argument is optional.

[-- Attachment #3: gdb.patch --]
[-- Type: text/x-patch, Size: 845 bytes --]

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 765ac83..5488c29 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -959,7 +959,9 @@ proc gdb_test_multiple { command message user_code } {
 # COMMAND is the command to execute, send to GDB with send_gdb.  If
 #   this is the null string no command is sent.
 # PATTERN is the pattern to match for a PASS, and must NOT include
-#   the \r\n sequence immediately before the gdb prompt.
+#   the \r\n sequence immediately before the gdb prompt.  This argument
+#   may be omitted to just match the prompt, ignoring whatever output 
+#   precedes it.
 # MESSAGE is an optional message to be printed.  If this is
 #   omitted, then the pass/fail messages use the command string as the
 #   message.  (If this is the empty string, then sometimes we don't

      reply	other threads:[~2015-12-25 19:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 19:23 [patch 0/3] fix some gdb.base/paginate-bg-execution.exp problems Sandra Loosemore
2015-12-18 19:31 ` [patch 1/3] make prompt_for_continue call throw_quit directly Sandra Loosemore
2015-12-18 19:34   ` Pedro Alves
2015-12-18 19:44 ` [patch 2/3] reset pagination counts even when stdin is not a tty Sandra Loosemore
2015-12-18 20:17   ` Pedro Alves
2015-12-18 19:50 ` [patch 3/3] add missing gdb_test arguments in paginate-bg-execution.exp Sandra Loosemore
2015-12-18 20:40   ` Pedro Alves
2015-12-18 23:49     ` Sandra Loosemore
2015-12-21 11:53       ` Pedro Alves
2015-12-21 12:27         ` Joel Brobecker
2015-12-25 19:39           ` Sandra Loosemore [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=567D9B51.4040901@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=brobecker@adacore.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