Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 5/5] ctf test: report.exp
Date: Wed, 27 Feb 2013 02:19:00 -0000	[thread overview]
Message-ID: <1361931459-3953-6-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1361931459-3953-1-git-send-email-yao@codesourcery.com>

This is a test to see GDB gets the same output as live inferior and
TFILE trace format.

This patch depends on this patch,

  [PATCH 1/2] Check trace data from trace file
  http://sourceware.org/ml/gdb-patches/2013-02/msg00611.html

gdb/testsuite:

2013-02-27  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/report.exp: Test GDB saves trace data to CTF
	format and read CTF trace file if GDB supports.
---
 gdb/testsuite/gdb.trace/report.exp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp
index b32bca1..d074c1f 100644
--- a/gdb/testsuite/gdb.trace/report.exp
+++ b/gdb/testsuite/gdb.trace/report.exp
@@ -408,6 +408,10 @@ gdb_tfind_test "finished: make sure not debugging any trace frame" \
 # Save trace frames to tfile.
 gdb_test "tsave report.tf" "Trace data saved to file 'report.tf'.*"
 
+# Save trace frames to ctf.
+gdb_test "tsave -ctf report.ctf" \
+    "Trace data saved to directory 'report.ctf'.*"
+
 # Change target to tfile.
 set test "change to tfile target"
 gdb_test_multiple "target tfile report.tf" "$test" {
@@ -421,3 +425,20 @@ gdb_test_multiple "target tfile report.tf" "$test" {
 }
 # Test the collected trace frames from tfile.
 use_collected_data "tfile"
+
+# Save trace frames to ctf format if GDB is able to read ctf data.
+set gdb_can_read_ctf_data 0
+gdb_test_multiple "target ctf" "" {
+    -re "Undefined target command: \"ctf\"\.  Try \"help target\"\.\r\n$gdb_prompt $" {
+	set gdb_can_read_ctf_data 0
+    }
+    -re "No CTF directory specified.*\r\n$gdb_prompt $" {
+	set gdb_can_read_ctf_data 1
+    }
+}
+
+if { $gdb_can_read_ctf_data } {
+    # Change target to ctf.
+    gdb_test_no_output "target ctf report.ctf" "change to ctf target"
+    use_collected_data "ctf"
+}
-- 
1.7.7.6


  parent reply	other threads:[~2013-02-27  2:19 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27  2:18 [PATCH 0/5, 2nd try] CTF Support Yao Qi
2013-02-27  2:18 ` [PATCH 1/5] Refactor 'tsave' Yao Qi
2013-02-28 16:49   ` Pedro Alves
2013-03-01  8:58     ` Yao Qi
2013-03-01 10:05       ` Pedro Alves
2013-03-01 10:41         ` Pedro Alves
2013-03-01 11:26         ` Yao Qi
2013-03-01 12:13           ` Pedro Alves
2013-03-01 15:55             ` Yao Qi
2013-03-05 20:59               ` Pedro Alves
2013-03-03  8:45         ` Yao Qi
2013-02-27  2:19 ` [PATCH 4/5] ctf doc and NEWS Yao Qi
2013-02-27 18:39   ` Eli Zaretskii
2013-02-27  2:19 ` [PATCH 2/5] Save trace into CTF format Yao Qi
2013-02-28 13:17   ` Yao Qi
2013-02-28 13:17     ` Andreas Schwab
2013-02-28 17:19       ` Pedro Alves
2013-03-01 19:22     ` Tom Tromey
2013-03-03 10:19       ` Yao Qi
2013-03-07 21:29         ` Tom Tromey
2013-03-16  2:30         ` Joel Brobecker
2013-03-16  4:22           ` Yao Qi
2013-02-27  2:19 ` [PATCH 3/5] Read CTF by the ctf target Yao Qi
2013-02-28 17:59   ` Pedro Alves
2013-03-01  2:38     ` Hui Zhu
2013-05-07 13:07       ` Mathieu Desnoyers
2013-05-07 13:24         ` Yao Qi
2013-05-07 13:28           ` Mathieu Desnoyers
2013-03-01  7:55     ` Yao Qi
2013-03-01  9:15       ` Pedro Alves
2013-03-01 15:51   ` Tom Tromey
2013-03-03 10:39     ` Yao Qi
2013-03-03 10:46       ` Yao Qi
2013-02-27  2:19 ` Yao Qi [this message]
2013-02-27 18:48   ` [PATCH 5/5] ctf test: report.exp Pedro Alves
2013-02-28  1:36     ` Yao Qi
2013-02-28 18:30       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361931459-3953-6-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox