From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14385 invoked by alias); 19 Oct 2017 14:17:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14357 invoked by uid 89); 19 Oct 2017 14:17:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Oct 2017 14:17:52 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v9JEHj8Q003926 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Oct 2017 10:17:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 71F141E541; Thu, 19 Oct 2017 10:17:45 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 57FE61E517; Thu, 19 Oct 2017 10:17:44 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 19 Oct 2017 14:17:00 -0000 From: Simon Marchi To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: Remove hard-coded line number from test In-Reply-To: <20171019131004.14544-1-andrew.burgess@embecosm.com> References: <20171019131004.14544-1-andrew.burgess@embecosm.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 19 Oct 2017 14:17:45 +0000 X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00616.txt.bz2 On 2017-10-19 09:10, Andrew Burgess wrote: > Removes the use of a hard-coded line number from a test. > > gdb/testsuite/ChangeLog: > > * gdb.linespec/ls-errs.exp (do_test): Update comment, use line > number from variable rather than hard-coded. > --- > gdb/testsuite/ChangeLog | 5 +++++ > gdb/testsuite/gdb.linespec/ls-errs.exp | 4 ++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp > b/gdb/testsuite/gdb.linespec/ls-errs.exp > index f55cd0e8e9..ee8bb087f0 100644 > --- a/gdb/testsuite/gdb.linespec/ls-errs.exp > +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp > @@ -117,10 +117,10 @@ proc do_test {lang} { > foreach x $invalid_offsets { > set offset $x > > - # Relative offsets are relative to line 16. Adjust > + # Relative offsets are relative to the current line. Adjust > # expected offset from error message accordingly. > if {[string index $x 0] == "+" || [string index $x 0] == "-"} { > - incr offset 24 > + incr offset $bp_location > } > test_break $x invalid_offset $offset > test_break "-line $x" invalid_offset $offset LGTM, thanks. Simon