This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Tweak for pthreads.exp testcase (resend)
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] Tweak for pthreads.exp testcase (resend)
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 4 Jun 2001 16:47:19 -0700 (PDT)
OK, let's try again, this time with the actual patch instead of the file.
If the "Stop with ^C" test fails, then all subsequent tests in this
script will time out. Rather than wait for that to happen, detect
the failure and terminate the test.
2001-06-04 Michael Snyder <msnyder@redhat.com>
* gdb.threads/pthreads.exp (check_control_c): Return 0 for success,
non-zero if control_c fails. Terminate the test on failure,
rather than wait for 12 more tests to time out.
Index: pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthreads.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 pthreads.exp
*** pthreads.exp 2001/05/25 01:10:20 1.5
--- pthreads.exp 2001/06/04 23:04:21
*************** proc check_control_c {} {
*** 259,264 ****
--- 259,265 ----
}
timeout {
fail "$description (timeout)"
+ return 1;
}
}
gdb_test "bt" ""
*************** proc check_control_c {} {
*** 267,272 ****
--- 268,274 ----
if [all_threads_running] then {
pass "All threads running after continuing from ^C stop"
}
+ return 0;
}
proc check_backtraces {} {
*************** setup_xfail "alpha-*-osf*"
*** 337,343 ****
if [runto_main] then {
clear_xfail "alpha-*-osf*"
if [test_startup] then {
! check_control_c
check_backtraces
}
}
--- 339,348 ----
if [runto_main] then {
clear_xfail "alpha-*-osf*"
if [test_startup] then {
! if [check_control_c] then {
! warning "Could not stop child with ^C; skipping rest of tests.\n"
! return;
! }
check_backtraces
}
}