From: Jim Kingdon Date: Sat, 14 Jan 1995 18:23:51 +0000 (+0000) Subject: * gdb.base/sigall.exp (test_one_sig): Attempt to recover if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d593cdda95f8090633e1b0ac0da6c3b6dfbb6b1;p=binutils-gdb.git * gdb.base/sigall.exp (test_one_sig): Attempt to recover if "get signal $thissig" test fails. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a586daa9c49..705d4e7ec9a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,8 @@ Sat Jan 14 11:25:28 1995 Jim Kingdon + * 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 diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp index 10de1aa31b7..b3f6504e51d 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"