From patchwork Mon Nov 23 15:41:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 9796 Received: (qmail 43754 invoked by alias); 23 Nov 2015 15:42:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43743 invoked by uid 89); 23 Nov 2015 15:42:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f48.google.com Received: from mail-pa0-f48.google.com (HELO mail-pa0-f48.google.com) (209.85.220.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Nov 2015 15:42:07 +0000 Received: by pabfh17 with SMTP id fh17so200373738pab.0 for ; Mon, 23 Nov 2015 07:42:05 -0800 (PST) X-Received: by 10.98.8.3 with SMTP id c3mr16784555pfd.89.1448293325342; Mon, 23 Nov 2015 07:42:05 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id yh3sm10880130pbb.82.2015.11.23.07.41.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 07:41:56 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Allow multiple occurrences of the frames-invalid annotation in gdb.cp/annota2.exp Date: Mon, 23 Nov 2015 15:41:50 +0000 Message-Id: <1448293310-18824-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes Hi, I see one fail on aarch64-linux testing, FAIL: gdb.cp/annota2.exp: watch triggered on a.x (timeout) because GDB prints two frames-invalid annotation but the test expects only one. next^M ^M ^Z^Zpost-prompt^M ^M ^Z^Zstarting^M ^M ^Z^Zframes-invalid^M ^M ^Z^Zframes-invalid^M ^M Note I also see the fail on Debian-s390x-m64 too. https://sourceware.org/ml/gdb-testers/2015-q4/msg07291.html The test shouldn't only expect one frames-invalid annotation, because there can be multiple times of stop/resume before the user visible stop. Ulrich did something similar before https://www.sourceware.org/ml/gdb-patches/2009-06/msg00118.html This patch only changes ${frames_invalid} to \(${frames_invalid}\)* in the regexp pattern. The patch below fixes the fail on aarch64-linux. gdb/testsuite: 2015-11-23 Yao Qi * gdb.cp/annota2.exp: Allow multiple occurrences of the frames-invalid annotation. --- gdb/testsuite/gdb.cp/annota2.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 041f65d..ed3fd1b 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -162,7 +162,7 @@ gdb_test_multiple "watch a.x" "set watch on a.x" { # annotate-watchpoint # gdb_test_multiple "next" "watch triggered on a.x" { - -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n${frames_invalid}${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(${frames_invalid}\)*${breakpoints_invalid}\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" { pass "watch triggered on a.x" } }