summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2002-09-18 17:11:53 +0000
committerFernando Nasser <fnasser@redhat.com>2002-09-18 17:11:53 +0000
commitf1beeda59b64caa7ac9b2523adfdac39debb5a62 (patch)
tree0287cf6d0ddd0b315fc999607f3debfb95f68576 /gdb
parentea34b2a97712f398267cda6b368b7816b43ffa50 (diff)
downloadgdb-f1beeda59b64caa7ac9b2523adfdac39debb5a62.tar.gz
* gdb.base/ending-run.exp: Properly mark "continue after exit" and
"don't step after run" as unresolved or unsupported, instead of xfail.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp30
2 files changed, 32 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 40ff8db9757..e9249c132ef 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-18 Fernando Nasser <fnasser@redhat.com>
+
+ * gdb.base/ending-run.exp: Properly mark "continue after exit" and
+ "don't step after run" as unresolved or unsupported, instead of xfail.
+
2002-09-18 Corinna Vinschen <vinschen@redhat.com>
* gdb.base/ending-run.exp: Fix expected string for _wrap_main to
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 1b0f5607834..989406a9b23 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -233,6 +233,9 @@ gdb_expect {
# every BSP's exit function behaves differently, so there's no single
# way to tell whether we've exited gracefully or not. So don't run
# these tests when use_gdb_stub is set, or when we're running under Cygmon.
+set program_exited_normally 0
+set program_not_exited 0
+set program_in_exit 0
if {! [target_info exists use_gdb_stub]
&& (! [target_info exists use_cygmon] || ! [target_info use_cygmon])} {
global program_exited;
@@ -244,33 +247,54 @@ if {! [target_info exists use_gdb_stub]
# then we won't get the "Single-stepping until function
# exit" message.
pass "step to end of run"
+ set program_exited_normally 1
}
-re "Single.*EXIT code 0\r\n.*Program exited normally.*$gdb_prompt $" {
pass "step to end of run (status wrapper)"
+ set program_exited_normally 1
}
-re ".*Single.*Program exited.*$gdb_prompt $" {
pass "step to end of run"
+ set program_exited_normally 1
}
-re ".*Single.*in exit.*from.*dld.sl.*$gdb_prompt $" {
pass "step to end of run"
- gdb_test "c" ".*" "continue after exit"
+ set program_in_exit 1
}
-re ".*Single.*_int_reset.*$gdb_prompt $" {
pass "step to end of run"
- setup_xfail "xstormy16-*-*"
+ if {![istarget "xstormy16-*-*"]} {
+ set program_exited_normally 1
+ }
}
-re ".*$gdb_prompt $" {
fail "step to end of run"
+ set program_not_exited 1
}
timeout {
fail "(timeout) step to end of run"
+ set program_not_exited 1
}
}
}
+ if {$program_in_exit} {
+ if {[gdb_test "c" ".*" "continue after exit"] == 0} {
+ set program_exited_normally 1
+ }
+ } else {
+ unsupported "continue after exit"
+ }
+
set timeout $old_timeout
- gdb_test "n" ".*The program is not being run.*" "don't step after run"
+ if {$program_exited_normally} {
+ gdb_test "n" ".*The program is not being run.*" "don't step after run"
+ } elseif {$program_not_exited} {
+ unresolved "don't step after run"
+ } else {
+ unsupported "don't step after run"
+ }
set exec_output [remote_exec host "ls core"]