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


>>>>> "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


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