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]

[PATCH v3 10/15] tstatus.exp: ctf


Similarly, the output of "tstatus" should be identical to the output
when trace status is read from tfile or live target.

gdb/testsuite:

2013-03-08  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/tstatus.exp: Save trace data to CTF.  If ctf
	target is supported, change to ctf target, read trace data and
	check output of command "tstatus".
---
 gdb/testsuite/gdb.trace/tstatus.exp |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp
index c105048..7668240 100644
--- a/gdb/testsuite/gdb.trace/tstatus.exp
+++ b/gdb/testsuite/gdb.trace/tstatus.exp
@@ -139,6 +139,9 @@ test_tracepoints
 
 # Save trace frames to tfile.
 gdb_test "tsave tstatus.tf" "Trace data saved to file 'tstatus.tf'.*"
+# Save trace frames to CTF.
+gdb_test "tsave -ctf ${testfile}.ctf" \
+    "Trace data saved to directory 'tstatus.ctf'.*"
 
 # Change target to tfile.
 set test "change to tfile target"
@@ -159,3 +162,13 @@ set tstatus_output [string map {\) \\)} $tstatus_output]
 # The status should be identical to the status of live inferior.
 gdb_test "tstatus" "Using a trace file\.\r\n${tstatus_output}.*" \
     "tstatus on tfile target"
+
+# Change target to ctf if GDB supports.
+gdb_test_multiple "target ctf ${testfile}.ctf" "" {
+    -re "Undefined target command: \"ctf ${testfile}.ctf\"\.  Try \"help target\"\.\r\n$gdb_prompt $" {
+    }
+    -re ".*\r\n$gdb_prompt $" {
+	gdb_test "tstatus" "Using a trace file\.\r\n${tstatus_output}.*" \
+	    "tstatus on ctf target"
+    }
+}
-- 
1.7.7.6


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