This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add CTF support to GDB [5] Add test for CTF function


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

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

Attachment: ctf-test.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]