aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-01-14 18:23:51 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-01-14 18:23:51 +0000
commit2d593cdda95f8090633e1b0ac0da6c3b6dfbb6b1 (patch)
treec9e8965cbdd4d8e1d0e1fb01615a35182fa393a9 /gdb/testsuite/gdb.base
parent8248d21bd963b967ddd8e5e05d299d29046a3134 (diff)
downloadgdb-2d593cdda95f8090633e1b0ac0da6c3b6dfbb6b1.zip
gdb-2d593cdda95f8090633e1b0ac0da6c3b6dfbb6b1.tar.gz
gdb-2d593cdda95f8090633e1b0ac0da6c3b6dfbb6b1.tar.bz2
* gdb.base/sigall.exp (test_one_sig): Attempt to recover if
"get signal $thissig" test fails.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/sigall.exp25
1 files changed, 20 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp
index 10de1aa..b3f6504 100644
--- a/gdb/testsuite/gdb.base/sigall.exp
+++ b/gdb/testsuite/gdb.base/sigall.exp
@@ -43,15 +43,30 @@ proc test_one_sig {nextsig} {
"SIG$thissig\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes"
gdb_test "b handle_$thissig" "Breakpoint \[0-9\]"
gdb_test "b gen_$nextsig" "Breakpoint \[0-9\]"
+
+ set need_another_continue 1
if $this_sig_supported then {
- gdb_test "continue" \
- "Continuing.*Program received signal SIG$thissig" \
- "get signal $thissig"
+ send "continue\n"
+ expect {
+ -re "Continuing.*Program received signal SIG$thissig.*$prompt $" {
+ pass "get signal $thissig"
+ }
+ -re ".*$prompt $" {
+ fail "get signal $thissig"
+ set need_another_continue 0
+ }
+ default {
+ fail "get signal $thissig (eof or timeout)"
+ }
+ }
}
- gdb_test "continue" "Breakpoint.*handle_$thissig" "send signal $thissig"
+ if $need_another_continue then {
+ gdb_test "continue" \
+ "Breakpoint.*handle_$thissig" "send signal $thissig"
+ }
- send "continue\n"
+ send "signal 0\n"
expect {
-re "Breakpoint.*gen_$nextsig.*kill.*$prompt $" {
pass "advance to $nextsig"