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

Yao Qi yao@codesourcery.com
Thu Apr 11 15:24:00 GMT 2013


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.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list