Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Tweak for pthreads.exp testcase (resend)
@ 2001-06-04 16:47 Michael Snyder
  2001-06-04 17:20 ` Fernando Nasser
  2001-06-06 11:38 ` Michael Snyder
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Snyder @ 2001-06-04 16:47 UTC (permalink / raw)
  To: gdb-patches

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
      }
  }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Tweak for pthreads.exp testcase (resend)
  2001-06-04 16:47 [RFA] Tweak for pthreads.exp testcase (resend) Michael Snyder
@ 2001-06-04 17:20 ` Fernando Nasser
  2001-06-06 11:38 ` Michael Snyder
  1 sibling, 0 replies; 3+ messages in thread
From: Fernando Nasser @ 2001-06-04 17:20 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Michael,

Your subject line Who are you asking approval from?

The MAINTAINERS file lists:

  threads (gdb.threads) Michael Snyder          msnyder@redhat.com

Habits are hard to break, eh?  :-)

Cheers,
Fernando


Michael Snyder wrote:
> 
> 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
>       }
>   }

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Tweak for pthreads.exp testcase (resend)
  2001-06-04 16:47 [RFA] Tweak for pthreads.exp testcase (resend) Michael Snyder
  2001-06-04 17:20 ` Fernando Nasser
@ 2001-06-06 11:38 ` Michael Snyder
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2001-06-06 11:38 UTC (permalink / raw)
  To: gdb-patches

Michael Snyder wrote:
> 
> 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.

Committed.

> 
> 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
>       }
>   }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-06 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-04 16:47 [RFA] Tweak for pthreads.exp testcase (resend) Michael Snyder
2001-06-04 17:20 ` Fernando Nasser
2001-06-06 11:38 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox