aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2006-09-05 10:13:07 +0000
committerNick Roberts <nickrob@snap.net.nz>2006-09-05 10:13:07 +0000
commit2a4a51b4e4cf99590371d1b9dae5eed24f8deea3 (patch)
treefbb0957329e020ee190f9706c651e49c0379891c
parentb7699cf23957e6d4a9faa7cee02be1d461764f0f (diff)
downloadfsf-binutils-gdb-2a4a51b4e4cf99590371d1b9dae5eed24f8deea3.zip
fsf-binutils-gdb-2a4a51b4e4cf99590371d1b9dae5eed24f8deea3.tar.gz
fsf-binutils-gdb-2a4a51b4e4cf99590371d1b9dae5eed24f8deea3.tar.bz2
Add a new test for restarting inferior.
-rw-r--r--gdb/testsuite/gdb.mi/mi-async.exp25
1 files changed, 23 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index 8938286..2dff8f7 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -54,7 +54,7 @@ proc linux_async_tests {} {
send_gdb "start\n"
gdb_expect {
- -re "\\^running\r\n\\^done\r\n$mi_gdb_prompt" {
+ -re ".*\\^running\r\n\\^done\r\n$mi_gdb_prompt" {
gdb_expect {
-re "\\*stopped,thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" {
pass "Asynchronous response after start command"
@@ -93,10 +93,31 @@ proc linux_async_tests {} {
}
timeout {fail "Asynchronous response after next command (timeout 1)"}
}
+
+ send_gdb "start\n"
+ gdb_expect {
+ -re ".*\\^running\r\n\\^done\r\n$mi_gdb_prompt" {
+ gdb_expect {
+ -re "\\*stopped,thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"$line_main_body\"\}\r\n$mi_gdb_prompt$" {
+ pass "Asynchronous response after (re) start"
+ }
+ -re ".*$mi_gdb_prompt$" {
+ fail "Asynchronous response after (re) start (2)"
+ }
+ timeout {
+ fail "Asynchronous response after (re) start (timeout 2)"
+ }
+ }
+ }
+ -re ".*$mi_gdb_prompt$" {
+ fail "Asynchronous response after (re) start (1)"
+ }
+ timeout {fail "Asynchronous response after (re) start (timeout 1)"}
+ }
}
-#if [istarget "i386-*-linux"] then {
+#if [istarget "i386-*-linux-gnu"] then {
linux_async_tests
#}