From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18796 invoked by alias); 17 Aug 2012 08:58:45 -0000 Received: (qmail 18782 invoked by uid 22791); 17 Aug 2012 08:58:43 -0000 X-SWARE-Spam-Status: No, hits=-4.4 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; Fri, 17 Aug 2012 08:58:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1T2INw-0001g9-Ft from Yao_Qi@mentor.com ; Fri, 17 Aug 2012 01:58:28 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 17 Aug 2012 01:58:28 -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; Fri, 17 Aug 2012 01:58:26 -0700 Message-ID: <502E079D.2020001@codesourcery.com> Date: Fri, 17 Aug 2012 08:58:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Jan Kratochvil CC: Subject: Re: Regression for gdb.trace/tfind.exp [Re: [PATCH] 'tfind none' is an alias of 'tfind end'.] References: <1344850554-10470-1-git-send-email-yao@codesourcery.com> <20120817082419.GA23591@host2.jankratochvil.net> In-Reply-To: <20120817082419.GA23591@host2.jankratochvil.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit 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: 2012-08/txt/msg00474.txt.bz2 On 08/17/2012 04:24 PM, Jan Kratochvil wrote: > help tfind end^M > -Synonym for 'none'.^M > De-select any trace frame and resume 'live' debugging.^M > -(gdb) PASS: gdb.trace/tfind.exp: 8.38: help tfind end > +(gdb) FAIL: gdb.trace/tfind.exp: 8.38: help tfind end "Synonym for 'none'' is removed as 'tfind none' becomes an alias of 'tfind end', so the test here should be updated. The reason I missed this regression is that I forgot to run testsuite with gdbserver, however, tests (checking the output of some 'help xxx' commands) here can be run in native testing. Below is the fix to remove "Synonym for 'none'" in test, and move these tests related on 'help xxx' output before checking target supports trace or not. With this patch applied, the output of these 'help xxx' command are tested in native testing as well. In native, we get, # of expected passes 10 # of unsupported tests 1 In remote/gdbserver, we get, # of expected passes 85 Is it OK? -- Yao gdb/testsuite: 2012-08-17 Yao Qi * gdb.trace/tfind.exp: Move tests on various command help before checking target supports trace. Fix the expected output of 'help tfind end'. --- gdb/testsuite/gdb.trace/tfind.exp | 52 ++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 24 deletions(-) diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp index cce742e..edd3335 100644 --- a/gdb/testsuite/gdb.trace/tfind.exp +++ b/gdb/testsuite/gdb.trace/tfind.exp @@ -31,6 +31,34 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ gdb_load $binfile gdb_test "tstop" ".*" "" gdb_test "tfind none" ".*" "" + +# 6.2 test help tstart +gdb_test "help tstart" \ + "Start trace data collection\.\[\r\n\]+Usage: tstart \\\[ \.\.\. \\\]\[\r\n\]+Any arguments supplied are recorded with the trace as a note and\[\r\n\]+reported by tstatus \\(if the target supports trace notes\\)\." \ + "6.2: help tstart" +# 7.2 test help tstop +gdb_test "help tstop" \ + "Stop trace data collection\.\[\r\n\]+Usage: tstop \\\[ \.\.\. \\\]\[\r\n\]+Any arguments supplied are recorded with the trace as a stop reason and\[\r\n\]+reported by tstatus \\(if the target supports trace notes\\)\." \ + "7.2: help tstop" + +# 8.38 test help tfind +gdb_test "help tfind" "Select a trace frame.*" \ + "8.38: help tfind" +gdb_test "help tfind pc" "Select a trace frame by PC.*" \ + "8.38: help tfind PC" +gdb_test "help tfind end" "De-select any trace frame.*" \ + "8.38: help tfind end" +gdb_test "help tfind none" "De-select any trace frame.*" \ + "8.38: help tfind none" +gdb_test "help tfind line" "Select a trace frame by source line.*" \ + "8.38: help tfind line" +gdb_test "help tfind start" "Select the first trace frame.*" \ + "8.38: help tfind start" +gdb_test "help tfind range" "Select a trace frame whose PC is in.*" \ + "8.38: help tfind range" +gdb_test "help tfind trace" "Select a trace frame by tracepoint number.*" \ + "8.38: help tfind tracepoint" + runto_main gdb_reinitialize_dir $srcdir/$subdir @@ -99,9 +127,6 @@ if { $return_me == 1 } then { # test tstatus (when trace on) gdb_test "tstatus" "\[Tt\]race is running.*" "test tstatus on" -# 6.2 test help tstart -gdb_test "help tstart" "Start trace data collection\.\[\r\n\]+Usage: tstart \\\[ \.\.\. \\\]\[\r\n\]+Any arguments supplied are recorded with the trace as a note and\[\r\n\]+reported by tstatus \\(if the target supports trace notes\\)\." "6.2: help tstart" - gdb_test "break end" ".*" "" gdb_test "continue" \ "Continuing.*Breakpoint $decimal, end.*" \ @@ -130,9 +155,6 @@ if { $return_me == 1 } then { return -1; } -# 7.2 test help tstop -gdb_test "help tstop" "Stop trace data collection\.\[\r\n\]+Usage: tstop \\\[ \.\.\. \\\]\[\r\n\]+Any arguments supplied are recorded with the trace as a stop reason and\[\r\n\]+reported by tstatus \\(if the target supports trace notes\\)\." "7.2: help tstop" - # test tstatus (when trace off) gdb_test "tstatus" "Trace stopped by a tstop command.*" \ "test tstatus off after tstop" @@ -339,23 +361,5 @@ gdb_test "tfind NoSuChOpTiOn 21" \ "No symbol.*|\[Ww\]arning.*|\[Ee\]rror.*" \ "8.32: tfind with bad subcommand" -# 8.38 test help tfind -gdb_test "help tfind" "Select a trace frame.*" \ - "8.38: help tfind" -gdb_test "help tfind pc" "Select a trace frame by PC.*" \ - "8.38: help tfind PC" -gdb_test "help tfind end" "Synonym for 'none'.*" \ - "8.38: help tfind end" -gdb_test "help tfind none" "De-select any trace frame.*" \ - "8.38: help tfind none" -gdb_test "help tfind line" "Select a trace frame by source line.*" \ - "8.38: help tfind line" -gdb_test "help tfind start" "Select the first trace frame.*" \ - "8.38: help tfind start" -gdb_test "help tfind range" "Select a trace frame whose PC is in.*" \ - "8.38: help tfind range" -gdb_test "help tfind trace" "Select a trace frame by tracepoint number.*" \ - "8.38: help tfind tracepoint" - # Finished! gdb_tfind_test "8.17: tfind none" "none" "-1" -- 1.7.7.6