From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4623 invoked by alias); 25 Apr 2012 13:53:59 -0000 Received: (qmail 4608 invoked by uid 22791); 25 Apr 2012 13:53:57 -0000 X-SWARE-Spam-Status: No, hits=-6.5 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 Apr 2012 13:53:41 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3PDreY6009394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Apr 2012 09:53:41 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3PDrdaI006687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Apr 2012 09:53:40 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Subject: FYI: fixlet for linux-dp.exp Date: Wed, 25 Apr 2012 14:39:00 -0000 Message-ID: <8762cndijg.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-04/txt/msg00860.txt.bz2 I'm checking this in. While running the test suite I got: ERROR: tcl error sourcing ../../../archer/gdb/testsuite/gdb.threads/linux-dp.exp. ERROR: can't array set "seen": variable isn't array while executing "array set seen {}" (file "../../../archer/gdb/testsuite/gdb.threads/linux-dp.exp" line 342) invoked from within "source ../../../archer/gdb/testsuite/gdb.threads/linux-dp.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source ../../../archer/gdb/testsuite/gdb.threads/linux-dp.exp" invoked from within "catch "uplevel #0 source $test_file_name"" This fixes the problem by unsetting 'seen' before the 'array set'. There's no reason to do things in the current order, the unset removes the "array-ness". It would be nice if dejagnu made a new interpreter for each .exp file, so that variable name clashes couldn't happen... Tom 2012-04-25 Tom Tromey * gdb.threads/linux-dp.exp: Unset 'seen' before 'array set'. Index: gdb.threads/linux-dp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/linux-dp.exp,v retrieving revision 1.30 diff -u -r1.30 linux-dp.exp --- gdb.threads/linux-dp.exp 16 Jan 2012 16:21:53 -0000 1.30 +++ gdb.threads/linux-dp.exp 25 Apr 2012 13:50:51 -0000 @@ -339,8 +339,8 @@ } set any_interesting 0 +catch {unset seen} array set seen {} -unset seen for {set i 1} {$i <= $nthreads} {incr i} { if [check_philosopher_stack $i seen] { set any_interesting 1