From patchwork Mon Aug 5 10:53:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 33962 Received: (qmail 11765 invoked by alias); 5 Aug 2019 10:54:02 -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 11757 invoked by uid 89); 5 Aug 2019 10:54:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1589, checkread1, check-read1 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Aug 2019 10:54:01 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C88F0B009; Mon, 5 Aug 2019 10:53:58 +0000 (UTC) Subject: [committed][gdb/testsuite] Fix typo in tcl_version_at_least From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey References: <20190801085800.GA30177@delia> Openpgp: preference=signencrypt Message-ID: Date: Mon, 5 Aug 2019 12:53:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190801085800.GA30177@delia> X-IsSubscribed: yes [ was: [committed][gdb/testsuite] Fix gdb.base/structs.exp timeout with check-read1 ] On 01-08-19 10:58, Tom de Vries wrote: > +# Return 1 if tcl version used is at least MAJOR.MINOR > +proc tcl_version_at_least { major minor } { > + global tcl_version > + regexp {^([0-9]+)\.([0-9]+)$} $tcl_version \ > + dummy tcl_version_major tcl_version_minor > + if { $tcl_version_major > $major } { > + return 1 > + } elseif { $tcl_version_major == $major \ > + && $tcl_version_major >= $minor } { > + return 1 > + } else { > + return 0 > + } > +} This fixes a typo in the previous commit. Thanks, - Tom [gdb/testsuite] Fix typo in tcl_version_at_least In tcl_version_at_least we compare a minor against a major version number: ... } elseif { $tcl_version_major == $major \ && $tcl_version_major >= $minor } { ... Fix this by using $tcl_version_minor in the comparison instead. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-08-05 Tom de Vries * lib/gdb.exp (tcl_version_at_least): Fix typo. --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9ca34d8b15..6d16217f3b 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1111,7 +1111,7 @@ proc tcl_version_at_least { major minor } { if { $tcl_version_major > $major } { return 1 } elseif { $tcl_version_major == $major \ - && $tcl_version_major >= $minor } { + && $tcl_version_minor >= $minor } { return 1 } else { return 0