From patchwork Fri Dec 2 19:02:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 18142 Received: (qmail 95582 invoked by alias); 2 Dec 2016 19:02:51 -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 95558 invoked by uid 89); 2 Dec 2016 19:02:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Dec 2016 19:02:40 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1cCt6U-00074N-8G from Luis_Gustavo@mentor.com ; Fri, 02 Dec 2016 11:02:38 -0800 Received: from Opsys.world.mentorg.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Fri, 2 Dec 2016 11:02:37 -0800 From: Luis Machado To: , Subject: [PATCH] [v2] Remove unneeded pattern matching in gdb.base/maint.exp Date: Fri, 2 Dec 2016 13:02:36 -0600 Message-ID: <1480705356-15200-1-git-send-email-lgustavo@codesourcery.com> In-Reply-To: <4906c887-a561-be85-d918-34050f240d6d@redhat.com> References: <4906c887-a561-be85-d918-34050f240d6d@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Thanks for clarifying the gdb_prompt situation. Updated patch attached. Btw, check-read1 did catch the problem with a couple failures. I didn't know about that one. --- This gets rid of more useless pattern matching cases in gdb.base/maint.exp. gdb/testsuite/ChangeLog: 2016-12-02 Luis Machado * gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when possible. Remove useless pattern-matching code. --- gdb/testsuite/gdb.base/maint.exp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 17c606b..c66c9ed 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -290,25 +290,13 @@ gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint pri -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" { gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" { -re "msymbols_output2\r\n$gdb_prompt $" { - gdb_test_multiple "shell grep factorial msymbols_output2" "maint print msymbols" { - -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" { - pass "maint print msymbols" - } - -re ".*$gdb_prompt $" { - fail "maint print msymbols" - } - } - gdb_test "shell rm -f msymbols_output2" ".*" \ - "shell rm -f msymbols_output2" - } - -re ".*$gdb_prompt $" { - fail "maint print msymbols" + gdb_test "shell grep factorial msymbols_output2" \ + "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \ + "maint print msymbols" + gdb_test "shell rm -f msymbols_output2" ".*" } } } - -re ".*$gdb_prompt $" { - fail "maint print msymbols" - } } gdb_test "cd ${mydir}" \ "Working directory [string_to_regexp ${mydir}]\..*" \