From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>, Pedro Alves <palves@redhat.com>
Subject: Re: [PATCH] gdb.base/async.exp: Handle "asynchronous execution not supported"
Date: Tue, 08 Dec 2015 20:17:00 -0000 [thread overview]
Message-ID: <20151208131702.00048638@pinnacle.lan> (raw)
In-Reply-To: <20151208080124.GA2712@adacore.com>
On Tue, 8 Dec 2015 09:01:24 +0100
Joel Brobecker <brobecker@adacore.com> 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"
next prev parent reply other threads:[~2015-12-08 20:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 6:23 Kevin Buettner
2015-12-08 8:01 ` Joel Brobecker
2015-12-08 20:17 ` Kevin Buettner [this message]
2015-12-09 10:13 ` Pedro Alves
2015-12-09 16:28 ` Kevin Buettner
2015-12-08 10:01 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151208131702.00048638@pinnacle.lan \
--to=kevinb@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox