From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1672 invoked by alias); 9 Mar 2013 03:49:34 -0000 Received: (qmail 1631 invoked by uid 22791); 9 Mar 2013 03:49:32 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Mar 2013 03:49:24 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UEAme-0003g3-RY from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 08 Mar 2013 19:49:20 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Mar 2013 19:49:20 -0800 Received: from qiyao.dyndns.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Fri, 8 Mar 2013 19:49:18 -0800 From: Yao Qi To: Subject: [PATCH v3 14/15] Test on saving tracepoint defs: CTF Date: Sat, 09 Mar 2013 03:49:00 -0000 Message-ID: <1362800844-27940-15-git-send-email-yao@codesourcery.com> In-Reply-To: <1362800844-27940-1-git-send-email-yao@codesourcery.com> References: <1362800844-27940-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00403.txt.bz2 Similarly, we have to exercise the CTF code on writing actions to trace file and restoring them. gdb/testsuite: 2013-03-08 Yao Qi * gdb.trace/actions.exp: Save trace data to CTF. Change to ctf target if GDB supports, read CTF data in ctf target, and check the actions of tracepoints. * gdb.trace/while-stepping.exp: Likewise. --- gdb/testsuite/gdb.trace/actions.exp | 17 +++++++++++++++++ gdb/testsuite/gdb.trace/while-stepping.exp | 17 +++++++++++++++++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index 7bbe6b6..0a77365 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -308,6 +308,8 @@ check_tracepoint "live" gdb_test_no_output "tstop" "" gdb_test "tsave ${testfile}.tf" \ "Trace data saved to file '${testfile}.tf'\.\\r" +gdb_test "tsave -ctf ${testfile}.ctf" \ + "Trace data saved to directory '${testfile}.ctf'\.\\r" # Restart GDB and read the trace data in tfile target. gdb_exit @@ -317,3 +319,18 @@ gdb_file_cmd $binfile gdb_test "target tfile ${testfile}.tf" ".*" \ "change to tfile target" check_tracepoint "tfile" + +# Try to read ctf data 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_exit + gdb_start + gdb_reinitialize_dir $srcdir/$subdir + gdb_file_cmd $binfile + gdb_test "target ctf ${testfile}.ctf" ".*" \ + "change to ctf target" + check_tracepoint "ctf" + } +} diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index 0f316eb..e057fab 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -132,6 +132,8 @@ check_tracepoint "live" gdb_test_no_output "tstop" gdb_test "tsave ${testfile}.tf" \ "Trace data saved to file '${testfile}.tf'\.\\r" +gdb_test "tsave -ctf ${testfile}.ctf" \ + "Trace data saved to directory '${testfile}.ctf'\.\\r" # Restart GDB and read the trace data in tfile target. gdb_exit @@ -141,3 +143,18 @@ gdb_file_cmd $binfile gdb_test "target tfile ${testfile}.tf" ".*" \ "change to tfile target" check_tracepoint "tfile" + +# Try to read ctf data 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_exit + gdb_start + gdb_reinitialize_dir $srcdir/$subdir + gdb_file_cmd $binfile + gdb_test "target ctf ${testfile}.ctf" ".*" \ + "change to ctf target" + check_tracepoint "ctf" + } +} -- 1.7.7.6