This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb.base/async.exp: Handle "asynchronous execution not supported"
- From: Kevin Buettner <kevinb at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 9 Dec 2015 16:24:38 -0000
- Subject: [binutils-gdb] gdb.base/async.exp: Handle "asynchronous execution not supported"
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5fc2beac27f81d0840e717e3dd8d6524f9c2e890
commit 5fc2beac27f81d0840e717e3dd8d6524f9c2e890
Author: Kevin Buettner <kevinb@redhat.com>
Date: Mon Dec 7 23:07:29 2015 -0700
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.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.base/async.exp | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e4b396f..a367451 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-09 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/async.exp (proc test_background): Add case for
+ asynchronous execution not supported.
+
2015-12-09 Luis Machado <lgustavo@codesourcery.com>
* gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal
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"