From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29431 invoked by alias); 13 Feb 2009 23:16:20 -0000 Received: (qmail 29422 invoked by uid 22791); 13 Feb 2009 23:16:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Feb 2009 23:16:12 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1DNG3V4021965; Fri, 13 Feb 2009 18:16:03 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1DNG2Vr026497; Fri, 13 Feb 2009 18:16:03 -0500 Received: from opsy.redhat.com (vpn-13-250.rdu.redhat.com [10.11.13.250]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1DNG1eq008833; Fri, 13 Feb 2009 18:16:02 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id D7796C880D0; Fri, 13 Feb 2009 16:15:59 -0700 (MST) To: "Pierre Muller" Cc: Subject: Re: small test suite cleanup References: <005701c98df9$25262600$6f727200$@u-strasbg.fr> <000101c98e2d$3cc425d0$b64c7170$@u-strasbg.fr> From: Tom Tromey Reply-To: Tom Tromey Date: Fri, 13 Feb 2009 23:38:00 -0000 In-Reply-To: <000101c98e2d$3cc425d0$b64c7170$@u-strasbg.fr> (Pierre Muller's message of "Fri\, 13 Feb 2009 23\:48\:48 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-02/txt/msg00313.txt.bz2 >>>>> "Pierre" == Pierre Muller writes: Pierre> I changed get_valueof proc to accept Pierre> anything as a return value and Pierre> added a new get_integer_valueof proc Pierre> that has no format parameter and Pierre> uses "print /d $exp". It looks pretty good, I have one nit. Pierre> +proc get_integer_valueof { exp default } { Pierre> + global gdb_prompt Pierre> + Pierre> + set test "get integer valueof \"${exp}\"" Pierre> + set val ${default} Pierre> + gdb_test_multiple "print /d ${exp}" "$test" { Pierre> -re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" { Pierre> set val $expect_out(1,string) Pierre> pass "$test ($val)" Pierre> } Pierre> timeout { Pierre> - set size ${default} Pierre> fail "get value of ${exp} (timeout)" This line should use $test. This is ok with this change. If you want to get rid of get_valueofx, and have the caller use get_valueof, that would be fine by me. thanks, Tom