From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11782 invoked by alias); 16 Jul 2008 19:29:39 -0000 Received: (qmail 11773 invoked by uid 22791); 16 Jul 2008 19:29:38 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Jul 2008 19:29:12 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id m6GJSRlh198798 for ; Wed, 16 Jul 2008 19:28:27 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6GJSSeJ2900036 for ; Wed, 16 Jul 2008 21:28:28 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6GJSRvi006893 for ; Wed, 16 Jul 2008 21:28:27 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m6GJSR1W006890; Wed, 16 Jul 2008 21:28:27 +0200 Message-Id: <200807161928.m6GJSR1W006890@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 16 Jul 2008 21:28:27 +0200 Subject: Re: [patch]: Improve spu-info testcase To: deuling@de.ibm.com (Markus Deuling) Date: Wed, 16 Jul 2008 19:29:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches) In-Reply-To: <4861E262.909@de.ibm.com> from "Markus Deuling" at Jun 25, 2008 08:14:58 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-07/txt/msg00338.txt.bz2 Markus Deuling wrote: > * gdb.arch/spu-info.exp (tmp_file): Introduce temporary file and set > it as command line argument for test binary. Delete after usage. > * gdb.arch/spu-info.c (main): Receive command line arguments. > (do_dma_test): Add file paramater. Sorry for the late reply ... > @@ -221,7 +218,10 @@ main (unsigned long long speid, unsigned > res = do_event_test (); > > /* info spu dma */ > - res = do_dma_test (); > + if (argc == 2) > + res = do_dma_test (argv[1]); > + else > + res = do_dma_test ("/var/tmp/tmp_buf"); I'd prefer this gets passed *always* as argument, and the .exp script chooses the name ... > +set tmp_file "" > +if { [info exists env(PWD)] && > + [info exists env(USER)] } then { > + set tmp_file $env(PWD)/gdb_spu_info_$env(USER) > + gdb_test "set args $tmp_file" "" "" > +} ... because I think we should just use a name in the directory where the tests execute anyway. Other tests do it likewise (e.g. the corefile tests). > gdb_test "info spu dma" \ > - "Tag-Group Status.*0x00000000.*Tag-Group Mask.*0x00000000.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000.*Opcode.*Tag.*TId.*RId.*EA.*LSA.*Size.*LstAddr.*LstSize.*E.*0.*0.*0.*0.*0x00000 0x00000.*" \ > + "Tag-Group Status.*0x00000001.*Tag-Group Mask.*0x00000001.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000.*Opcode.*Tag.*TId.*RId.*EA.*LSA.*Size.*LstAddr.*LstSize.*E.*0.*0.*0.*0.*0x00000 0x00000.*" \ > "info spu dma (empty)" > - "Tag-Group Status.*0x00000000.*Tag-Group Mask.*0x00000020.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000.*Opcode.*Tag.*TId.*RId.*EA.*LSA.*Size.*LstAddr.*LstSize.*E.*getl.*putllc.*get.*mfcsync.*get.*0.*0.*0.*0.*0x00000 0x00000.*" \ > + "Tag-Group Status.*0x00000001.*Tag-Group Mask.*0x00000020.*Stall-and-Notify.*0x00000000.*Atomic Cmd Status.*0x00000000.*Opcode.*Tag.*TId.*RId.*EA.*LSA.*Size.*LstAddr.*LstSize.*E.*getl.*putllc.*get.*mfcsync.*get.*0.*0.*0.*0.*0x00000 0x00000.*" \ > "info spu dma (non-empty)" This seem to be unrelated changes; are they deliberate? If so, they need to be mentioned in the ChangeLog. > +if { [file exists $tmp_file] } then { > + file delete $tmp_file > +} This will not work for remote tests; you should use remote_file build delete like e.g. corefile.exp does. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com