This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[testsuite] Patch to remove misplaced xfail in gdb.base/ending-run.exp
- From: Fernando Nasser <fnasser at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 18 Sep 2002 13:12:35 -0400
- Subject: [testsuite] Patch to remove misplaced xfail in gdb.base/ending-run.exp
- Organization: Red Hat Canada
Commited the following.
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.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: testsuite/gdb.base/ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.16
diff -c -p -r1.16 ending-run.exp
*** testsuite/gdb.base/ending-run.exp 19 Jul 2002 00:02:34 -0000 1.16
--- testsuite/gdb.base/ending-run.exp 18 Sep 2002 15:40:25 -0000
*************** gdb_expect {
*** 233,238 ****
--- 233,241 ----
# 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;
*************** if {! [target_info exists use_gdb_stub]
*** 244,276 ****
# then we won't get the "Single-stepping until function
# exit" message.
pass "step to end of run"
}
-re "Single.*EXIT code 0.*Program exited normally.*$gdb_prompt $" {
pass "step to end of run (status wrapper)"
}
-re ".*Single.*Program exited.*$gdb_prompt $" {
pass "step to end of run"
}
-re ".*Single.*in exit.*from.*dld.sl.*$gdb_prompt $" {
pass "step to end of run"
! gdb_test "c" ".*" "continue after exit"
}
-re ".*Single.*_int_reset.*$gdb_prompt $" {
pass "step to end of run"
! setup_xfail "xstormy16-*-*"
}
-re ".*$gdb_prompt $" {
fail "step to end of run"
}
timeout {
fail "(timeout) step to end of run"
}
}
}
set timeout $old_timeout
! gdb_test "n" ".*The program is not being run.*" "don't step after run"
set exec_output [remote_exec host "ls core"]
--- 247,300 ----
# 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.*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"
! set program_in_exit 1
}
-re ".*Single.*_int_reset.*$gdb_prompt $" {
pass "step to end of run"
! 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
! 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"]