From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5451 invoked by alias); 27 Aug 2013 12:12:35 -0000 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 Received: (qmail 5441 invoked by uid 89); 27 Aug 2013 12:12:34 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Aug 2013 12:12:34 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com 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 r7RCCWGZ021337 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Aug 2013 08:12:32 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7RCCU0E006552; Tue, 27 Aug 2013 08:12:31 -0400 Message-ID: <521C97AE.4040707@redhat.com> Date: Tue, 27 Aug 2013 12:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH 05/13] fix up gdb.xml References: <1377290210-483-1-git-send-email-tromey@redhat.com> <1377290210-483-6-git-send-email-tromey@redhat.com> In-Reply-To: <1377290210-483-6-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00780.txt.bz2 On 08/23/2013 09:36 PM, Tom Tromey wrote: > diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp > index 5fde2ff..be0b9f1 100644 > --- a/gdb/testsuite/gdb.xml/tdesc-arch.exp > +++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp > @@ -60,17 +60,20 @@ proc set_arch { arch which } { > global gdb_prompt > global subdir > > - set fd [open "$subdir/tdesc-arch.xml" w] > + set filename [standard_output_file tdesc-arch.xml] > + set fd [open $filename w] > puts $fd \ > " > $arch > " > close $fd > - remote_download host "${subdir}/tdesc-arch.xml" "tdesc-arch.xml" > + if {[is_remote host]} { > + set filename [remote_download host $filename tdesc-arch.xml] > + } > > # Anchor the test output, so that error messages are detected. > - set cmd "set tdesc filename tdesc-arch.xml" > - set msg "$cmd ($which architecture)" > + set cmd "set tdesc filename $filename" > + set msg "set tdesc filename ($which architecture)" Should be: set msg "set tdesc filename tdesc-arch.xml ($which architecture)" > -set cmd "set tdesc filename tdesc-arch.xml" > +set cmd "set tdesc filename $filename" > gdb_test $cmd \ > "warning:.*Target description specified unknown architecture.*" \ > - "$cmd (invalid architecture)" > + "set tdesc filename tdesc-arch.xml (invalid architecture)" (Like here.) > set cmd_regex [string_to_regexp $cmd] > gdb_test_multiple $cmd $msg { > -re "^$cmd_regex\r\n$gdb_prompt $" { > @@ -86,31 +89,32 @@ proc set_arch { arch which } { > "The target architecture is set automatically \\(currently $arch\\)" \ > "$cmd ($which architecture)" > > - file delete "${subdir}/tdesc-arch.xml" > - remote_file host delete "tdesc-arch.xml" > + remote_file host delete $filename I noticed this seems to leave the build machine's copy behind. Was that on purpose? > } > # Similarly, we need to copy files under test into the objdir. > -proc load_description { file errmsg } { > +proc load_description { file errmsg {should_cd 1} } { Could you add a comment on the should_cd parameter please? It's not obvious to me why a test should cd, while the other shouldn't. -- Pedro Alves