From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18334 invoked by alias); 4 Jun 2004 19:19:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18320 invoked from network); 4 Jun 2004 19:19:08 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Jun 2004 19:19:08 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i54JJ8i5015371 for ; Fri, 4 Jun 2004 15:19:08 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i54JJ7w30315; Fri, 4 Jun 2004 15:19:07 -0400 Received: from redhat.com (dhcp-172-16-25-160.sfbay.redhat.com [172.16.25.160]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i54JJ6P23132; Fri, 4 Jun 2004 12:19:06 -0700 Message-ID: <40C0CB2A.8020100@redhat.com> Date: Fri, 04 Jun 2004 19:19:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040301 MIME-Version: 1.0 To: Michael Elizabeth Chastain CC: gdb-patches@sources.redhat.com Subject: Re: [rfa/testsuite/threads] pthreads.exp: copyright, sync 'after' References: <20040604155413.6E4F84B104@berman.michael-chastain.com> In-Reply-To: <20040604155413.6E4F84B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00080.txt.bz2 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 > > * 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 >