From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29081 invoked by alias); 19 Dec 2007 14:51:16 -0000 Received: (qmail 29071 invoked by uid 22791); 19 Dec 2007 14:51:15 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 14:51:09 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 5945F187023; Wed, 19 Dec 2007 15:55:15 +0100 (CET) From: "Pierre Muller" To: "'Daniel Jacobowitz'" Cc: , 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> <20071219140353.GA20359@caradoc.them.org> In-Reply-To: <20071219140353.GA20359@caradoc.them.org> Subject: RE: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads Date: Wed, 19 Dec 2007 14:55:00 -0000 Message-ID: <001501c8424e$9a71ca10$cf555e30$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us 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/msg00311.txt.bz2 > -----Original Message----- > From: 'Daniel Jacobowitz' [mailto:drow@false.org] > Sent: Wednesday, December 19, 2007 3:04 PM > 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 > > 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. Thanks, I committed my change in the same directory. > 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. It should probably also use gdb_compile_pthreads to try to compile the source. > > +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. I found this, in gdb.base/watchpoint.exp: # Disable hardware watchpoints if necessary. if [target_info exists gdb,no_hardware_watchpoints] { gdb_test "set can-use-hw-watchpoints 0" "" "" } but I still didn't really understand what those "target_info exists" commands really are: - how are they set? - does it make it possible to run the testsuite with hardware watchpoints disabled? gdb.threads/watchthreads.exp contains this: # This test verifies that a watchpoint is detected in the proper thread # so the test is only meaningful on a system with hardware watchpoints. if [target_info exists gdb,no_hardware_watchpoints] { return 0; } But where and how is gdb,no_hardware_watchpoints set? Pierre Muller