From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6756 invoked by alias); 3 Jun 2004 18:07:31 -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 6745 invoked from network); 3 Jun 2004 18:07:30 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Jun 2004 18:07:30 -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 i53I7Ui5023099 for ; Thu, 3 Jun 2004 14:07:30 -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 i53I7Sw09564; Thu, 3 Jun 2004 14:07:28 -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 i53I7SP07005; Thu, 3 Jun 2004 11:07:28 -0700 Message-ID: <40BF68DF.5040609@redhat.com> Date: Thu, 03 Jun 2004 18:07: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: jjohnstn@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [rfa/testsuite/threads] ping: manythreads.exp References: <20040602173434.E638E4B104@berman.michael-chastain.com> In-Reply-To: <20040602173434.E638E4B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00055.txt.bz2 Michael Elizabeth Chastain wrote: > This patch fixes a problem in gdb.threads/manythreads.exp. > I've submitted this patch before on 2004-05-07 and 2004-05-14. > > manythreads.exp uses asynchronous TCL blocks to send "^C" at a later > time, similar to the shell code: "(sleep 1 ; send ^C) &". If the tests > fail -- and they do sometimes fail -- manythreads.exp leaves these > asynchronous blocks in the background, where they ruin the unlucky next > test, which happens to be gdb.threads/print-threads.exp. > > This patch changes the sleeps from asynchronous to synchronous so that > there is no cleanup to do: "(sleep 1 ; send ^C)". > > I tested this (again) on native i686-pc-linux-gnu, red hat 8.0, group of 6 > test runs before and after. > > OK to commit? > > Michael C So... this means it will unconditionally wait, right? Can I assume that "after 1000" means milliseconds, not seconds? That's my only concern, that if it fails for some reason, it will block for a long time. If that's not the case, then the change is ok with me (if it's ok with Jeff). Michael, I notice that the same idiom is used in pthreads.exp; do you think your change would also be appropriate there, and if so, would you mind making it? thanks > > 2004-06-02 Michael Chastain > > Fix PR gdb/1636. > * gdb.threads/manythreads.exp: Change asynchronous 'after' > calls to synchronous. > > Index: gdb.threads/manythreads.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v > retrieving revision 1.1 > diff -c -3 -p -r1.1 manythreads.exp > *** gdb.threads/manythreads.exp 22 Apr 2004 22:19:40 -0000 1.1 > --- gdb.threads/manythreads.exp 7 May 2004 12:41:39 -0000 > *************** gdb_test_multiple "continue" "first cont > *** 60,66 **** > } > > # Send a Ctrl-C and verify that we can do info threads and continue > ! after 1000 {send_gdb "\003"} > set message "stop threads 1" > gdb_test_multiple "" "stop threads 1" { > -re "\\\[New \[^\]\]*\\\]\r\n" { > --- 60,67 ---- > } > > # Send a Ctrl-C and verify that we can do info threads and continue > ! after 1000 > ! send_gdb "\003" > set message "stop threads 1" > gdb_test_multiple "" "stop threads 1" { > -re "\\\[New \[^\]\]*\\\]\r\n" { > *************** gdb_test_multiple "continue" "second con > *** 93,99 **** > } > > # Send another Ctrl-C and verify that we can do info threads and quit > ! after 1000 {send_gdb "\003"} > set message "stop threads 2" > gdb_test_multiple "" "stop threads 2" { > -re "\\\[New \[^\]\]*\\\]\r\n" { > --- 94,101 ---- > } > > # Send another Ctrl-C and verify that we can do info threads and quit > ! after 1000 > ! send_gdb "\003" > set message "stop threads 2" > gdb_test_multiple "" "stop threads 2" { > -re "\\\[New \[^\]\]*\\\]\r\n" { >