This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb.base/async.exp: Handle "asynchronous execution not supported"

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.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"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]