Message ID | 5674636B.6090507@codesourcery.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 11039 invoked by alias); 18 Dec 2015 19:50:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10904 invoked by uid 89); 18 Dec 2015 19:50:38 -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=807, Hx-languages-length:1488, 80, 7 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, 18 Dec 2015 19:50:37 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1aA12w-00024X-3c from Sandra_Loosemore@mentor.com ; Fri, 18 Dec 2015 11:50:34 -0800 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Dec 2015 11:50:33 -0800 Subject: [patch 3/3] add missing gdb_test arguments in paginate-bg-execution.exp To: gdb-patches <gdb-patches@sourceware.org>, Pedro Alves <palves@redhat.com> References: <56745D29.504@codesourcery.com> From: Sandra Loosemore <sandra@codesourcery.com> Message-ID: <5674636B.6090507@codesourcery.com> Date: Fri, 18 Dec 2015 12:50:03 -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: <56745D29.504@codesourcery.com> Content-Type: multipart/mixed; boundary="------------090909020808060104050208" |
Commit Message
Sandra Loosemore
Dec. 18, 2015, 7:50 p.m. UTC
This patch fixes a think-o in gdb.base/paginate-bg-execution.exp -- there are two calls to gdb_test with only a single argument. Looking at the definition of this proc in lib/gdb.exp, the second argument (the output pattern) is not supposed to be optional. For whatever reason, I was only seeing failures on remote Windows host testing, but it must have been an accident that it appeared to be working elsewhere. I copied the breakpoint output pattern used elsewhere in the testsuite, and confirmed this passes now. OK to commit? -Sandra
Comments
On 12/18/2015 07:50 PM, Sandra Loosemore wrote: > This patch fixes a think-o in gdb.base/paginate-bg-execution.exp -- > there are two calls to gdb_test with only a single argument. Looking at > the definition of this proc in lib/gdb.exp, the second argument (the > output pattern) is not supposed to be optional. For whatever reason, I > was only seeing failures on remote Windows host testing, but it must > have been an accident that it appeared to be working elsewhere. > > I copied the breakpoint output pattern used elsewhere in the testsuite, > and confirmed this passes now. OK to commit? Can you show the gdb.log of the failed run? Thanks, Pedro Alves
On 12/18/2015 01:40 PM, Pedro Alves wrote: > On 12/18/2015 07:50 PM, Sandra Loosemore wrote: >> This patch fixes a think-o in gdb.base/paginate-bg-execution.exp -- >> there are two calls to gdb_test with only a single argument. Looking at >> the definition of this proc in lib/gdb.exp, the second argument (the >> output pattern) is not supposed to be optional. For whatever reason, I >> was only seeing failures on remote Windows host testing, but it must >> have been an accident that it appeared to be working elsewhere. >> >> I copied the breakpoint output pattern used elsewhere in the testsuite, >> and confirmed this passes now. OK to commit? > > Can you show the gdb.log of the failed run? Hmmmm. I lost the original log, and now I cannot reproduce the failure. I must be losing my marbles. :-( Is it supposed to be correct to call gdb_test with only one argument? If yes, I'll withdraw this patch and submit another one to tweak the comments in lib/gdb.exp to explicitly say the pattern arg is optional. -Sandra
On 12/18/2015 11:49 PM, Sandra Loosemore wrote: > On 12/18/2015 01:40 PM, Pedro Alves wrote: >> On 12/18/2015 07:50 PM, Sandra Loosemore wrote: >>> This patch fixes a think-o in gdb.base/paginate-bg-execution.exp -- >>> there are two calls to gdb_test with only a single argument. Looking at >>> the definition of this proc in lib/gdb.exp, the second argument (the >>> output pattern) is not supposed to be optional. For whatever reason, I >>> was only seeing failures on remote Windows host testing, but it must >>> have been an accident that it appeared to be working elsewhere. >>> >>> I copied the breakpoint output pattern used elsewhere in the testsuite, >>> and confirmed this passes now. OK to commit? >> >> Can you show the gdb.log of the failed run? > > Hmmmm. I lost the original log, and now I cannot reproduce the failure. > I must be losing my marbles. :-( > > Is it supposed to be correct to call gdb_test with only one argument? 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. > If yes, I'll withdraw this patch and submit another one to tweak the > comments in lib/gdb.exp to explicitly say the pattern arg is optional. I should we should do that indeed. Thanks, Pedro Alves
> 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.
diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp index f2a4d73..12d5250 100644 --- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp +++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp @@ -37,7 +37,7 @@ proc test_bg_execution_pagination_return {} { return 0 } - gdb_test "b after_sleep" + gdb_test "b after_sleep" "Breakpoint .* at .*" gdb_test_no_output "set height 2" @@ -80,7 +80,7 @@ proc test_bg_execution_pagination_cancel { how } { return 0 } - gdb_test "b after_sleep" + gdb_test "b after_sleep" "Breakpoint .* at .*" gdb_test_no_output "set height 2"