From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28069 invoked by alias); 19 Dec 2007 14:04:21 -0000 Received: (qmail 28055 invoked by uid 22791); 19 Dec 2007 14:04:20 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 14:03:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D3A1498151; Wed, 19 Dec 2007 14:03:54 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id B40959814F; Wed, 19 Dec 2007 14:03:54 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J4zWb-0005Nn-V4; Wed, 19 Dec 2007 09:03:53 -0500 Date: Wed, 19 Dec 2007 14:05:00 -0000 From: 'Daniel Jacobowitz' To: Pierre Muller Cc: luisgpm@linux.vnet.ibm.com, gdb-patches@sourceware.org Subject: Re: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads Message-ID: <20071219140353.GA20359@caradoc.them.org> Mail-Followup-To: Pierre Muller , luisgpm@linux.vnet.ibm.com, gdb-patches@sourceware.org References: <1187365616.4520.14.camel@localhost> <20071011193558.GE30810@caradoc.them.org> <1192134591.18528.1.camel@localhost> <1194961811.4820.3.camel@localhost> <1195042801.4908.2.camel@localhost> <20071216214836.GE2618@caradoc.them.org> <1197894945.24027.8.camel@gargoyle> <000601c8423e$f49ca010$ddd5e030$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000601c8423e$f49ca010$ddd5e030$@u-strasbg.fr> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00305.txt.bz2 On Wed, Dec 19, 2007 at 01:59:13PM +0100, Pierre Muller wrote: > This test currently fails on cygwin target > and it does by timeout's which means that it takes a lot of time... > The reason of the failure is that > thread #2 is a thread created internally by cygwin, > for posix emulation, and thus never > changes the value of the variable shared_var. Thanks. I saw a bunch of timeouts in this test too: (gdb) PASS: gdb.base/watch_thread_num.exp: Invalid watch syntax Next 5 41 res = pthread_create (&threads[i], (gdb) PASS: gdb.base/watch_thread_num.exp: Next 5 watch shared_var thread 2 Unknown thread 2. (gdb) FAIL: gdb.base/watch_thread_num.exp: Watchpoint on shared variable They aren't really related, but I think your patch will fix them too. Patch is OK. Some other things I noticed with this test: > --- gdb/testsuite/gdb.base/watch_thread_num.exp 17 Dec 2007 12:32:23 -00001.1 > +++ gdb/testsuite/gdb.base/watch_thread_num.exp 19 Dec 2007 08:45:41 -0000 This is a threads test, it should be in gdb.threads. > +for {set i 1} {$i <= 10} {incr i 1} { > +gdb_test "continue" "Hardware watchpoint 3: shared_var.*" \ > + "Watchpoint triggered iteration $i" This test won't work on any target without hardware watchpoints. It should either handle that (search for can-use-hw-watchpoints) or skip if the test is fundamentally broken without hardware watchpoints. Probably the latter. See watchthreads.exp. -- Daniel Jacobowitz CodeSourcery