From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23241 invoked by alias); 26 Jun 2010 17:16:17 -0000 Received: (qmail 23233 invoked by uid 22791); 26 Jun 2010 17:16:17 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Jun 2010 17:16:13 +0000 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id o5QHGA6V005677 for ; Sat, 26 Jun 2010 10:16:11 -0700 Received: from vws7 (vws7.prod.google.com [10.241.21.135]) by kpbe17.cbf.corp.google.com with ESMTP id o5QHG9Si015037 for ; Sat, 26 Jun 2010 10:16:10 -0700 Received: by vws7 with SMTP id 7so698593vws.0 for ; Sat, 26 Jun 2010 10:16:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.125.23 with SMTP id w23mr1510537vcr.2.1277572569277; Sat, 26 Jun 2010 10:16:09 -0700 (PDT) Received: by 10.220.180.70 with HTTP; Sat, 26 Jun 2010 10:16:09 -0700 (PDT) In-Reply-To: <5627205469024062490@unknownmsgid> References: <201006231542.12328.pedro@codesourcery.com> <5627205469024062490@unknownmsgid> Date: Sat, 26 Jun 2010 17:16:00 -0000 Message-ID: Subject: Re: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp From: Doug Evans To: Pierre Muller Cc: Pedro Alves , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2010-06/txt/msg00614.txt.bz2 On Wed, Jun 23, 2010 at 8:31 AM, Pierre Muller wrote: >> Pedantically, you don't need that "global" statement anymore. > > =A0I still didn't really understand this: > =A0when I run a testsuite with > 'make check'. > All individual tests are run from runtest script > which itself uses runtest procedure to execute > each .exp file using the source command. > =A0Thus I was thinking that the code > inside each .exp =A0file was not at global level, > but only at 'runtest procedure level', and I am not even sure > which level that procedure runs. > =A0Could someone explain to me why we are for sure > at global level when a .exp file is sourced? Because runtest invokes the .exp file as: if { [catch "uplevel #0 source $test_file_name"] =3D=3D 1 } {