From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18553 invoked by alias); 9 Dec 2012 12:53:32 -0000 Received: (qmail 18540 invoked by uid 22791); 9 Dec 2012 12:53:30 -0000 X-SWARE-Spam-Status: No, hits=-4.5 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; Sun, 09 Dec 2012 12:53:25 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1ThgNo-0002wq-Ic from Yao_Qi@mentor.com ; Sun, 09 Dec 2012 04:53:24 -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); Sun, 9 Dec 2012 04:53:24 -0800 Received: from qiyao.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; Sun, 9 Dec 2012 04:53:17 -0800 Message-ID: <50C489B3.8050101@codesourcery.com> Date: Sun, 09 Dec 2012 12:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 5/6] Test tracepoints are installed or not References: <1354596282-32526-1-git-send-email-yao@codesourcery.com> <1354596282-32526-6-git-send-email-yao@codesourcery.com> <50C1E38F.2020108@redhat.com> <50C1F553.8030502@codesourcery.com> <50C1FB3A.8050802@redhat.com> In-Reply-To: <50C1FB3A.8050802@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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-12/txt/msg00220.txt.bz2 On 12/07/2012 10:20 PM, Pedro Alves wrote: >> When pending tracepoint is resolved, breakpoint_modified observer is notified, and then, when tracepoint is downloaded, the breakpoint_modified observer is notified again. > Okay. Could you add a comment mentioning this in the test? Sure. Comments are added in the new version. -- Yao (齐尧) gdb/testsuite: 2012-12-09 Yao Qi * gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check 'installed' field in '=breakpoint-modified'. (test_reconnect): Check 'installed' field in '=breakpoint-modified' and '=breakpoint-created'. --- gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp index 2913b12..5955b58 100644 --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp @@ -133,10 +133,20 @@ proc test_reconnect { } { with_test_prefix "reconnect" { fail "$test: 2" exp_continue } - -re "=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*${mi_gdb_prompt}" { + -re "=breakpoint-created,bkpt=\{number=\"3\",type=\"tracepoint\",disp=\"keep\",enabled=\"y\",.*,func=\"main\".*installed=\"y\"" { # A tracepoint on main was defined in the stub, not in GDB, # so we should see a =breakpoint-created notification. pass $test + exp_continue + } + -re "=breakpoint-modified,bkpt=\{number=\"2\".*,func=\"marker\".*installed=\"y\"" { + # Tracepoint on marker is defined. After the sync, we + # know that the tracepoint is in remote stub. Mark it + # 'installed'. + pass "tracepoint on marker is installed" + exp_continue + } + -re ".*${mi_gdb_prompt}" { } timeout { fail $test @@ -189,9 +199,16 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" { mi_send_resuming_command "exec-continue" "continuing execution to marker 1" set test "tracepoint on pendfunc2 resolved" + # It is expected to get two "=breakpoint-modified" notifications. gdb_expect { - -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\"" { + -re "=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"n\"" { + # Pending tracepoint is resolved. pass "$test" + exp_continue + } + -re "=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*.*times=\"0\".*installed=\"y\"" { + # Resolved tracepoint is installed. + pass "tracepoint on pendfunc2 installed" } -re ".*${mi_gdb_prompt}$" { fail $test -- 1.7.7.6