From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24509 invoked by alias); 4 Mar 2013 15:37:02 -0000 Received: (qmail 24362 invoked by uid 22791); 4 Mar 2013 15:36:59 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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; Mon, 04 Mar 2013 15:36:31 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UCXRG-0006OC-SC from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 04 Mar 2013 07:36:30 -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); Mon, 4 Mar 2013 07:36:30 -0800 Received: from qiyao.dyndns.org.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; Mon, 4 Mar 2013 07:36:16 -0800 From: Yao Qi To: Subject: [PATCH] Fix a bug in tstatus.exp matching tstatus output Date: Mon, 04 Mar 2013 15:37:00 -0000 Message-ID: <1362411345-22308-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/msg00089.txt.bz2 When running gdb.trace/tstatus.exp, we got the following output, (gdb) tstatus Trace stopped by a tstop command (because I can). Collected 1 trace frames. Trace buffer has 5242418 bytes of 5242880 bytes free (0% full). Trace will stop if GDB disconnects. Trace user is me me me. Trace notes: different note. Not looking at any trace frame. Trace started at 572.802356 secs, stopped 0.085292 secs later. apparently the stop reason is printed, but the test summary is (gdb) PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason after examining tstatus.exp, I find the "\\\" is missed for parentheses in "(because I can)". This patch adds "\\\" for them, and the test summary becomes: (gdb) PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason In gdb testsuite, both "\\\(" and "\\(" are used. After reading section "4.3. Backslashes" in book "Exploring Expect", I think they are the same on effect. gdb/testsuite: 2013-03-04 Yao Qi * gdb.trace/tstatus.exp (run_trace_experiment): Add "\\\" to parentheses. --- gdb/testsuite/gdb.trace/tstatus.exp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp index db620d0..654b64e 100644 --- a/gdb/testsuite/gdb.trace/tstatus.exp +++ b/gdb/testsuite/gdb.trace/tstatus.exp @@ -99,7 +99,7 @@ proc run_trace_experiment {} { gdb_test_no_output "tstop because I can" "trace stopped with note" gdb_test_multiple "tstatus" "check on trace status after stop" { - -re "Trace stopped by a tstop command (because I can)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" { + -re "Trace stopped by a tstop command \\\(because I can\\\)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" { pass "tstatus reports trace stop reason" } -re "Trace stopped by a tstop command\..*\r\n$gdb_prompt $" { -- 1.7.7.6