* gdb.base/sigall.exp (test_one_sig): Attempt to recover if
authorJim Kingdon <jkingdon@engr.sgi.com>
Sat, 14 Jan 1995 18:23:51 +0000 (18:23 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Sat, 14 Jan 1995 18:23:51 +0000 (18:23 +0000)
"get signal $thissig" test fails.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/sigall.exp

index a586daa9c49c3b2179a5c4b848d6ca3345ebb1cf..705d4e7ec9a745ec5a4e4ce25866fd2da5e9ea57 100644 (file)
@@ -1,5 +1,8 @@
 Sat Jan 14 11:25:28 1995  Jim Kingdon  <kingdon@lioth.cygnus.com>
 
+       * gdb.base/sigall.exp (test_one_sig): Attempt to recover if
+       "get signal $thissig" test fails.
+
        * gdb.base/setvar.exp: Check for and reject crazy expected type hacks.
 
 Thu Jan 12 01:14:53 1995  Jim Kingdon  <kingdon@lioth.cygnus.com>
index 10de1aa31b7b7fd0000ed0a53afeecba631123d8..b3f6504e51dc51a75d38a1c1345ec20381bf02ac 100644 (file)
@@ -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"