Re: [PATCH v3 14/15] Test on saving tracepoint defs: CTF

Tom Tromey
2013-03-12T20:23:46Z

>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:

Yao> +gdb_test "tsave -ctf ${testfile}.ctf" \
Yao> + "Trace data saved to directory '${testfile}.ctf'\.\\r"

standard_output_file if you don't mind.

Yao> +gdb_test_multiple "target ctf ${testfile}.ctf" "" {
Yao> + -re "Undefined target command: \"ctf ${testfile}.ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" {
Yao> + }
Yao> + -re ".*\r\n$gdb_prompt $" {
Yao> + gdb_exit
Yao> + gdb_start
Yao> + gdb_reinitialize_dir $srcdir/$subdir
Yao> + gdb_file_cmd $binfile
Yao> + gdb_test "target ctf ${testfile}.ctf" ".*" \
Yao> + "change to ctf target"
Yao> + check_tracepoint "ctf"

It seems very iffy to me to restart gdb inside a call to gdb_test_multiple.
I would instead recommend setting a flag and checking it outside this
command.

Tom