From patchwork Tue Dec 8 20:17:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 9940 Received: (qmail 65702 invoked by alias); 8 Dec 2015 20:17:07 -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 65668 invoked by uid 89); 8 Dec 2015 20:17:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 08 Dec 2015 20:17:05 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id A07C03BEA9; Tue, 8 Dec 2015 20:17:04 +0000 (UTC) Received: from pinnacle.lan (ovpn-113-161.phx2.redhat.com [10.3.113.161]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB8KH3PU025274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Tue, 8 Dec 2015 15:17:04 -0500 Date: Tue, 8 Dec 2015 13:17:02 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Joel Brobecker , Pedro Alves Subject: Re: [PATCH] gdb.base/async.exp: Handle "asynchronous execution not supported" Message-ID: <20151208131702.00048638@pinnacle.lan> In-Reply-To: <20151208080124.GA2712@adacore.com> References: <20151207232255.15b0c35e@pinnacle.lan> <20151208080124.GA2712@adacore.com> MIME-Version: 1.0 X-IsSubscribed: yes On Tue, 8 Dec 2015 09:01:24 +0100 Joel Brobecker wrote: > You might want to escape the period you're trying to match > at the end of the sentence. Other than that, LGTM. Fixed in new patch. (See below.) I've addressed Pedro's concerns too. > Looking at this, would it be possible in this case to replace > the send_gdb/gdb_expect into test_gdb_multiple? I'm not really > sure, because of the async nature makes ordering of the output > relative to the gdb_prompt different from usual, and thus perhaps > outside the scope of what test_gdb_multiple is capable of doing... I don't know the answer to this either. I'll defer to someone who knows more about this than I do. Here's an updated patch... gdb.base/async.exp: Handle "asynchronous execution not supported" This change eliminates some failures on simulator targets and makes the test run a bit quicker too - without this change, we have to wait for timeouts. gdb/testsuite/ChangeLog: * gdb.base/async.exp (proc test_background): Add case for asynchronous execution not supported. --- gdb/testsuite/gdb.base/async.exp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp index 2d3fb73..6546bbc 100644 --- a/gdb/testsuite/gdb.base/async.exp +++ b/gdb/testsuite/gdb.base/async.exp @@ -57,17 +57,24 @@ proc test_background {command before_prompt after_prompt {message ""}} { gdb_expect { -re "^$command\r\n${before_prompt}${gdb_prompt}${after_prompt}completed\.\r\n" { pass "$message" + return 0 } -re "$gdb_prompt.*completed\.\r\n" { fail "$message" } + -re ".*Asynchronous execution not supported on this target\..*" { + unsupported "Asynchronous execution not supported: $message" + } timeout { fail "$message (timeout)" } } + return -1 } -test_background "next&" "" ".*z = 9.*" +if {[test_background "next&" "" ".*z = 9.*"] < 0} { + return +} test_background "step&" "" ".*y = foo \\(\\).*" "step& #1"