From patchwork Fri Dec 2 01:07:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 18117 Received: (qmail 54085 invoked by alias); 2 Dec 2016 01:07:40 -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 54066 invoked by uid 89); 2 Dec 2016 01:07:39 -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=2979, states 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 01:07:29 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1cCcJz-0000Fx-R3 from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Thu, 01 Dec 2016 17:07:27 -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; Thu, 1 Dec 2016 17:07:27 -0800 From: Luis Machado To: Subject: [PATCH] Don't handle timeout inside gdb_test_multiple Date: Thu, 1 Dec 2016 19:07:25 -0600 Message-ID: <1480640845-3564-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This fixes a few cases where the testcase is explicitly handling timeouts inside gdb_test_multiple when it is not necessary. It also converts two gdb_test_multiple calls to gdb_test_no_output calls (also removing the timeout handling). gdb/testsuite/ChangeLog: 2016-12-01 Luis Machado * gdb.base/maint.exp: Remove timeout handling for gdb_test_multiple. * gdb.cp/gdb2495.exp: Likewise and convert gdb_test_multiple into gdb_test_no_output for a couple of cases. * gdb.cp/ovldbreak.exp: Remove timeout handling for gdb_test_multiple. --- gdb/testsuite/gdb.base/maint.exp | 9 --------- gdb/testsuite/gdb.cp/gdb2495.exp | 10 ++-------- gdb/testsuite/gdb.cp/ovldbreak.exp | 4 ---- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index b07b370..17c606b 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -297,9 +297,6 @@ gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint pri -re ".*$gdb_prompt $" { fail "maint print msymbols" } - timeout { - fail "(timeout) maint print msymbols" - } } gdb_test "shell rm -f msymbols_output2" ".*" \ "shell rm -f msymbols_output2" @@ -307,17 +304,11 @@ gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint pri -re ".*$gdb_prompt $" { fail "maint print msymbols" } - timeout { - fail "(timeout) maint print msymbols" - } } } -re ".*$gdb_prompt $" { fail "maint print msymbols" } - timeout { - fail "(timeout) maint print msymbols" - } } gdb_test "cd ${mydir}" \ "Working directory [string_to_regexp ${mydir}]\..*" \ diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index b4304fb..ac74382 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -117,10 +117,7 @@ if ![runto_main] then { # behaviour; it should not. Test both on and off states. # Turn on unwind on signal behaviour. -gdb_test_multiple "set unwindonsignal on" "turn unwindonsignal on" { - -re "$gdb_prompt $" {pass "set unwindonsignal on"} - timeout {fail "(timeout) set unwindonsignal on"} -} +gdb_test_no_output "set unwindonsignal on" # Check that it is turned on. gdb_test "show unwindonsignal" \ @@ -133,10 +130,7 @@ gdb_test "p exceptions.raise_signal(1)" \ "To change this behavior use \"set unwindonsignal off\".*" # And reverse - turn off again. -gdb_test_multiple "set unwindonsignal off" "turn unwindonsignal off" { - -re "$gdb_prompt $" {pass "set unwindonsignal off"} - timeout {fail "(timeout) set unwindonsignal off"} -} +gdb_test_no_output "set unwindonsignal off" # Check that it is actually turned off. gdb_test "show unwindonsignal" \ diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 96d3bd3..b6c5efd 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -58,10 +58,6 @@ proc take_gdb_out_of_choice_menu {} { gdb_test_multiple " " " " { -re ".*$gdb_prompt $" { } - timeout { - perror "could not resynchronize to command prompt (timeout)" - continue - } } }