Re: [PATCH] store trace default-collect to target [6/6] test

Hui Zhu
2013-05-13T06:06:15Z

Ping http://sourceware.org/ml/gdb-patches/2013-04/msg00455.html

Thanks,
Hui

On Tue, Apr 16, 2013 at 5:32 PM, Hui Zhu <teawater@gmail.com> wrote:
> Hi Yao,
>
> Thanks for your review.
>
> On Thu, Apr 11, 2013 at 4:19 PM, Yao Qi <yao@codesourcery.com> wrote:
>> On 04/11/2013 03:40 PM, Hui Zhu wrote:
>>>
>>> --- a/testsuite/gdb.trace/tstatus.exp
>>> +++ b/testsuite/gdb.trace/tstatus.exp
>>> @@ -137,6 +137,8 @@ proc test_tracepoints {} {
>>>
>>> test_tracepoints
>>>
>>> +gdb_test_no_output "set default-collect \$regs"
>>> +
>>> set tracefile [standard_output_file ${testfile}]
>>> # Save trace frames to tfile.
>>> gdb_test "tsave ${tracefile}.tf" \
>>> @@ -147,6 +149,8 @@ gdb_test "tsave -ctf ${tracefile}.ctf" \
>>> "Trace data saved to directory '${tracefile}.ctf'.*" \
>>> "save ctf trace file"
>>>
>>> +gdb_test_no_output "set default-collect"
>>> +
>>> # Change target to tfile.
>>> set test "change to tfile target"
>>> gdb_test_multiple "target tfile ${tracefile}.tf" "$test" {
>>> @@ -159,6 +163,8 @@ gdb_test_multiple "target tfile ${tracef
>>> }
>>> }
>>>
>>> +gdb_test "show default-collect" "The list of expressions to collect by
>>> default is \"\\\$regs\".*"
>>> +
>>> # Convert "(because I can) to "\(because I can\)"
>>> set tstatus_output [string map {\( \\(} $tstatus_output]
>>> set tstatus_output [string map {\) \\)} $tstatus_output]
>>
>>
>> I am afraid that tstatus.exp is not a good place to test "default-collect".
>> The tstatus.exp is to test the output of command 'tstatus' in various
>> situations, and also test that the output of 'tstatus' command on tfile
>> target is identical to its output on the ctf target. Probably, actions.exp
>> is better, IMO.
>
> Move it to actions.exp
>
> Post a new version for it.
>
> Best,
> Hui
>
> 2013-04-16 Hui Zhu <hui@codesourcery.com>
>
> * gdb.trace/disconnected-tracing.exp (disconnected_tracing): Add
> test for default-collect.
> * gdb.trace/actions.exp: Add test for default-collect.
>
>>
>> --
>> Yao (齐尧)