From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30742 invoked by alias); 25 Jul 2012 13:48:19 -0000 Received: (qmail 30725 invoked by uid 22791); 25 Jul 2012 13:48:18 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jul 2012 13:47:51 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6PDlo0e000317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Jul 2012 09:47:50 -0400 Received: from host2.jankratochvil.net (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6PDlkF7024129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Jul 2012 09:47:49 -0400 Date: Wed, 25 Jul 2012 13:48:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: [patch] testsuite: Fix Tcl < 7.5 regression [Re: [PATCH] sigall.exp and friends: centralize signals list.] Message-ID: <20120725134740.GA6900@host2.jankratochvil.net> References: <20120719143526.8328.28449.stgit@brno.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120719143526.8328.28449.stgit@brno.lan> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-07/txt/msg00521.txt.bz2 On Thu, 19 Jul 2012 16:35:26 +0200, Pedro Alves wrote: > Tested x86_64 Fedora 17, and applied. [...] > --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp > +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp > +foreach sig [lreverse $signals] { > + test_one_sig_reverse $sig > +} --- 20120719Build-gdbcvs-epel5/epel-5-x86_64/out/gdb-m32.sum 2012-07-19 07:08:00.075100625 +0200 +++ 20120720Build-gdbcvs-epel5/epel-5-x86_64/out/gdb-m32.sum 2012-07-20 07:56:27.967798598 +0200 -Running gdb/testsuite/gdb.reverse/sigall-reverse.exp ... -PASS: gdb.reverse/sigall-reverse.exp: Turn on process record [...] +ERROR: (DejaGnu) proc "lreverse { + ABRT [...] + TERM +}" does not exist. I will check it in today. That 'info procs' is in fact not needed, 'proc lreverse' definition is a nop with new Tcl (=it does not replace the built-in proc of the same name). But I have rather put the conditional there. Thanks, Jan gdb/testsuite/ 2012-07-25 Jan Kratochvil Fix compatibility with Tcl before 7.5. * lib/future.exp (lreverse): New function if it does not exist. diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp index bf47988..26e668f 100644 --- a/gdb/testsuite/lib/future.exp +++ b/gdb/testsuite/lib/future.exp @@ -521,3 +521,16 @@ if {$use_gdb_compile} { catch {rename default_target_compile {}} rename gdb_default_target_compile default_target_compile } + + +# Provide 'lreverse' missing in Tcl before 7.5. + +if {[info procs lreverse] == ""} { + proc lreverse { arg } { + set retval {} + while { [llength $retval] < [llength $arg] } { + lappend retval [lindex $arg end-[llength $retval]] + } + return $retval + } +}