From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: gdb-patches@sources.redhat.com Subject: [RFA] Tweak for pthreads.exp testcase (resend) Date: Mon, 04 Jun 2001 16:47:00 -0000 Message-id: <200106042347.QAA17176@cleaver.cygnus.com> X-SW-Source: 2001-06/msg00033.html 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 * 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 } }