From patchwork Fri Dec 25 19:38:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 10136 Received: (qmail 42708 invoked by alias); 25 Dec 2015 19:39:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 42694 invoked by uid 89); 25 Dec 2015 19:39:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*sandra, H*F:U*sandra, H*MI:sk:2015122, MESSAGE X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Dec 2015 19:39:36 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1aCYD6-0000qJ-7Y from Sandra_Loosemore@mentor.com ; Fri, 25 Dec 2015 11:39:32 -0800 Received: from [IPv6:::1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Fri, 25 Dec 2015 11:39:31 -0800 Subject: Re: [patch 3/3] add missing gdb_test arguments in paginate-bg-execution.exp To: Joel Brobecker , Pedro Alves References: <56745D29.504@codesourcery.com> <5674636B.6090507@codesourcery.com> <56746F26.1040903@redhat.com> <56749B6C.7000804@codesourcery.com> <5677E835.4090603@redhat.com> <20151221122750.GB5564@adacore.com> CC: gdb-patches From: Sandra Loosemore Message-ID: <567D9B51.4040901@codesourcery.com> Date: Fri, 25 Dec 2015 12:38:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151221122750.GB5564@adacore.com> 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 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