From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22319 invoked by alias); 11 Feb 2013 12:55:31 -0000 Received: (qmail 22308 invoked by uid 22791); 11 Feb 2013 12:55:30 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-oa0-f52.google.com (HELO mail-oa0-f52.google.com) (209.85.219.52) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Feb 2013 12:55:22 +0000 Received: by mail-oa0-f52.google.com with SMTP id k14so6259549oag.11 for ; Mon, 11 Feb 2013 04:55:21 -0800 (PST) X-Received: by 10.60.29.193 with SMTP id m1mr10168935oeh.36.1360587321754; Mon, 11 Feb 2013 04:55:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.46.133 with HTTP; Mon, 11 Feb 2013 04:54:41 -0800 (PST) In-Reply-To: References: <50F3ADB8.1000603@codesourcery.com> <50F55E11.40008@codesourcery.com> <50F67844.5040007@codesourcery.com> <87a9s6a4tu.fsf@fleche.redhat.com> From: Hui Zhu Date: Mon, 11 Feb 2013 12:55:00 -0000 Message-ID: Subject: Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function To: Tom Tromey , Yao Qi Cc: Joel Brobecker , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 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: 2013-02/txt/msg00247.txt.bz2 On Fri, Jan 25, 2013 at 7:09 PM, Hui Zhu wrote: > Hi Yao and Tom, > > Thanks for your help. > > I post a new patch according to your comments. > And I remove "if [is_remote host] then {" check and update code to: > remote_exec host "which babeltrace" "" "/dev/null" "babeltrace.which" > > It work OK in my part. > > Please help me review it. > > Best, > Hui Hi, Ping. Thanks, Hui > > 2013-01-25 Hui Zhu > > * gdb.trace/Makefile.in (PROGS): Add ctf. > * gdb.trace/ctf.c: New file. > * gdb.trace/ctf.exp: New file. > > On Fri, Jan 18, 2013 at 11:28 PM, Tom Tromey wrote: >>>>>>> "Hui" == Hui Zhu writes: >> >> Hui> +set ctfdir $testfile.ctf >> >> I'd like it if new temporary files were all named using >> standard_output_file. This way we can move them later. >> >> Hui> +#Test "tsave -ctf" >> >> Space after "#". >> >> Hui> +#Get the pathname of babeltrace and set it to $which_babeltrace. >> Hui> +#If host doesn't have babeltrace, $which_babeltrace will set to 0. >> Hui> +if [info exists BABELTRACE] { >> Hui> + set which_babeltrace ${BABELTRACE} >> Hui> +} else { >> Hui> + if [is_remote host] then { >> Hui> + remote_exec host "which babeltrace" "" "" "babeltrace.which" >> >> This seems possibly questionable to me, but I don't really do any remote >> host testing. Is this used elsewhere in the test suite? >> >> Hui> +#Clean >> Hui> + >> Hui> +#remote_exec host "rm -rf $ctfdir" >> >> You might as well just delete this. >> >> I tend to think that having tests clean up after themselves is >> inconvenient, as it makes debugging any failures trickier -- you have to >> hack the test case and run it again in order to see the various files. >> >> I'm not sure whether this has ever been discussed here though. I do see >> that a fair number of tests do this kind of cleanup. >> >> Tom