From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2071 invoked by alias); 9 Mar 2013 03:49:40 -0000 Received: (qmail 2007 invoked by uid 22791); 9 Mar 2013 03:49:39 -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:28 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UEAmD-0003c3-Gp from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 08 Mar 2013 19:48:53 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Mar 2013 19:48:53 -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:48:52 -0800 From: Yao Qi To: Subject: [PATCH v3 05/15] ctf test: report.exp Date: Sat, 09 Mar 2013 03:49:00 -0000 Message-ID: <1362800844-27940-6-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/msg00409.txt.bz2 This is a test to see GDB gets the same output as live target and TFILE trace format. In V3, we remove the code checking target 'ctf' exists or not, just issue the command "target ctf report.ctf", if the command is recognized by GDB, do the tests otherwise, do nothing. gdb/testsuite: 2013-03-08 Yao Qi * 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 | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index b32bca1..fc5f711 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 ${testfile}.ctf" \ + "Trace data saved to directory '${testfile}.ctf'.*" + # Change target to tfile. set test "change to tfile target" gdb_test_multiple "target tfile report.tf" "$test" { @@ -421,3 +425,12 @@ gdb_test_multiple "target tfile report.tf" "$test" { } # Test the collected trace frames from tfile. use_collected_data "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 $" { + use_collected_data "ctf" + } +} -- 1.7.7.6