[rfa/testsuite/threads] pthreads.exp: copyright, sync 'after'
Michael Snyder
msnyder@redhat.com
Fri Jun 4 19:19:00 GMT 2004
Michael Elizabeth Chastain wrote:
> Hi Mike, here's the gdb.threads/pthreads.exp "after" patch that you were
> interested in.
>
> First it updates the copyright years. I included all the years that
> I actually found in "cvs log pthreads.exp" plus the ChangeLog.
>
> Then it changes the "after" call from async to sync. The async
> background call isn't hurting my test results, but sync is simpler.
>
> This is old news to some people, but let me run it down. In TCL, there
> are two ways to call the "after" builtin verb. One way is like this:
>
> after 1000 [send_gdb "\003"]
>
> This is an asynchronous block. TCL detaches the block and schedules
> it for execution in the future. Meanwhile, TCL keeps running.
> It's like doing "(sleep 1; send_gdb \003) &" in the shell.
> This is usually not what we want!
>
> The other way is like this:
>
> after 1000
> send_gdb "\003"
>
> This is synchronous; TCL waits for the "after 1000" to run before
> continuing. Like "sleep 1; send_gdb \003" in the shell.
>
> Testing: native i686-pc-linux-gnu, red hat 8.0, 6 test runs before
> and after. No change in test results.
>
> OK to commit?
Y'uh-huh!
> Michael C
>
> 2004-06-04 Michael Chastain <mec.gnu@mindspring.com>
>
> * gdb.threads/pthreads.exp: Update copyright years.
> (check_control_c): Change asynchronous 'after' to synchronous.
>
> Index: pthreads.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthreads.exp,v
> retrieving revision 1.11
> diff -c -3 -p -r1.11 pthreads.exp
> *** pthreads.exp 11 Apr 2003 13:55:31 -0000 1.11
> --- pthreads.exp 4 Jun 2004 15:37:33 -0000
> ***************
> *** 1,4 ****
> ! # Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> --- 1,5 ----
> ! # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
> ! # Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> *************** proc check_control_c {} {
> *** 230,238 ****
> fail "Continue with all threads running (timeout)"
> }
> }
> ! sleep 1
> set description "Stopped with a ^C"
> - after 1000 [send_gdb "\003"]
> gdb_expect {
> -re "Program received signal SIGINT.*$gdb_prompt $" {
> pass $description
> --- 231,239 ----
> fail "Continue with all threads running (timeout)"
> }
> }
> ! after 2000
> ! send_gdb "\003"
> set description "Stopped with a ^C"
> gdb_expect {
> -re "Program received signal SIGINT.*$gdb_prompt $" {
> pass $description
>
More information about the Gdb-patches
mailing list