This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function
- From: Hui Zhu <teawater at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>, Yao Qi <yao at codesourcery dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Mon, 11 Feb 2013 20:54:41 +0800
- Subject: Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function
- References: <CANFwon2=EmBWtGqx5ygrmMNt0MBM0oLbjOZ2VMsx5+S9TErP7w@mail.gmail.com> <50F3ADB8.1000603@codesourcery.com> <CANFwon1LH6ipUFXE2xHwXaG6ChzBEVVvoVn-bcnZJVbbYkQz3w@mail.gmail.com> <50F55E11.40008@codesourcery.com> <CANFwon2auJH47FLg8yZPpL6=60db_ZYmbjCEa2_9LfqEDAj2pw@mail.gmail.com> <50F67844.5040007@codesourcery.com> <CANFwon2m3D3MDKjuL9Hp+t-RBj7BoSUz_OapdNUP=P27rhjD0Q@mail.gmail.com> <87a9s6a4tu.fsf@fleche.redhat.com> <CANFwon2DTOKJR-D=Gys534s0C51Bgg=4+i1KoB6GGC49_C_v2A@mail.gmail.com>
On Fri, Jan 25, 2013 at 7:09 PM, Hui Zhu <teawater@gmail.com> 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 <hui_zhu@mentor.com>
>
> * 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 <tromey@redhat.com> wrote:
>>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> 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