From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Daniel Jacobowitz'" <drow@false.org>
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
Date: Wed, 19 Dec 2007 14:55:00 -0000 [thread overview]
Message-ID: <001501c8424e$9a71ca10$cf555e30$@u-strasbg.fr> (raw)
In-Reply-To: <20071219140353.GA20359@caradoc.them.org>
> -----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
next prev parent reply other threads:[~2007-12-19 14:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 21:03 [patch] Watchpoints: support for thread <thread_num> parameters Luis Machado
2007-08-17 10:24 ` Eli Zaretskii
2007-08-17 15:47 ` Luis Machado
2007-08-17 18:41 ` Eli Zaretskii
2007-08-17 18:50 ` Daniel Jacobowitz
2007-08-20 14:28 ` Luis Machado
2007-08-20 14:21 ` Daniel Jacobowitz
2007-08-20 15:23 ` Luis Machado
2007-08-20 15:29 ` Daniel Jacobowitz
2007-08-23 21:08 ` Joel Brobecker
2007-08-23 21:15 ` Luis Machado
2007-10-11 19:40 ` Daniel Jacobowitz
2007-10-11 20:33 ` Luis Machado
2007-11-13 14:50 ` Luis Machado
2007-11-13 15:38 ` Andreas Schwab
2007-11-13 22:30 ` Eli Zaretskii
2007-11-14 12:20 ` Luis Machado
2007-11-30 16:10 ` Luis Machado
2007-12-16 21:50 ` Daniel Jacobowitz
2007-12-17 13:29 ` Luis Machado
2007-12-19 13:05 ` [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads Pierre Muller
2007-12-19 13:56 ` Luis Machado
2007-12-19 14:04 ` Pierre Muller
2007-12-19 14:05 ` 'Daniel Jacobowitz'
2007-12-19 14:55 ` Pierre Muller [this message]
2007-12-19 15:04 ` 'Daniel Jacobowitz'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001501c8424e$9a71ca10$cf555e30$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=luisgpm@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox