From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5238 invoked by alias); 11 Apr 2013 08:20:04 -0000 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 Received: (qmail 5216 invoked by uid 89); 11 Apr 2013 08:20:04 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 08:20:03 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UQCji-0002Sr-Ax from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 11 Apr 2013 01:20:02 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 11 Apr 2013 01:20:02 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Thu, 11 Apr 2013 01:20:00 -0700 Message-ID: <5166722F.2000709@codesourcery.com> Date: Thu, 11 Apr 2013 15:24:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Hui Zhu CC: gdb-patches ml Subject: Re: [PATCH] store trace default-collect to target [6/6] test References: <51665508.5050706@mentor.com> <516655FC.6070206@mentor.com> <51666686.7090203@codesourcery.com> <516668F3.3030405@mentor.com> In-Reply-To: <516668F3.3030405@mentor.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-04/txt/msg00321.txt.bz2 On 04/11/2013 03:40 PM, Hui Zhu wrote: > --- a/testsuite/gdb.trace/tstatus.exp > +++ b/testsuite/gdb.trace/tstatus.exp > @@ -137,6 +137,8 @@ proc test_tracepoints {} { > > test_tracepoints > > +gdb_test_no_output "set default-collect \$regs" > + > set tracefile [standard_output_file ${testfile}] > # Save trace frames to tfile. > gdb_test "tsave ${tracefile}.tf" \ > @@ -147,6 +149,8 @@ gdb_test "tsave -ctf ${tracefile}.ctf" \ > "Trace data saved to directory '${tracefile}.ctf'.*" \ > "save ctf trace file" > > +gdb_test_no_output "set default-collect" > + > # Change target to tfile. > set test "change to tfile target" > gdb_test_multiple "target tfile ${tracefile}.tf" "$test" { > @@ -159,6 +163,8 @@ gdb_test_multiple "target tfile ${tracef > } > } > > +gdb_test "show default-collect" "The list of expressions to collect by default is \"\\\$regs\".*" > + > # Convert "(because I can) to "\(because I can\)" > set tstatus_output [string map {\( \\(} $tstatus_output] > set tstatus_output [string map {\) \\)} $tstatus_output] I am afraid that tstatus.exp is not a good place to test "default-collect". The tstatus.exp is to test the output of command 'tstatus' in various situations, and also test that the output of 'tstatus' command on tfile target is identical to its output on the ctf target. Probably, actions.exp is better, IMO. -- Yao (齐尧)