This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <luisgpm at linux dot vnet dot ibm dot com>
- Cc: "'Daniel Jacobowitz'" <drow at false dot org>, <gdb-patches at sourceware dot org>
- Date: Wed, 19 Dec 2007 15:01:04 +0100
- Subject: RE: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads
- References: <1187298178.5853.11.camel@localhost> <uwsvuv4re.fsf@gnu.org> <1187365616.4520.14.camel@localhost> <20071011193558.GE30810@caradoc.them.org> <1192134591.18528.1.camel@localhost> <1194961811.4820.3.camel@localhost> <u8x51eq40.fsf@gnu.org> <1195042801.4908.2.camel@localhost> <20071216214836.GE2618@caradoc.them.org> <1197894945.24027.8.camel@gargoyle> <000601c8423e$f49ca010$ddd5e030$@u-strasbg.fr> <1198072304.1209.21.camel@gargoyle>
> -----Original Message-----
> Hi Pierre,
>
> On Wed, 2007-12-19 at 13:59 +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 for pointing this out. I wasn't aware of that fact.
>
> > * (gdb.base/watch_thread_num.exp): Add breakpoint at
> > thread_function and record first explicitly generated
> > thread number.
> > Use that thread number for thread specific watchpoint test.
> > Add iteration number to repetitive tests.
>
> Looks OK. Maybe just "Use thread number for testing" and "Add iteration
> number" will do on those two phrases.
> > +gdb_test "disable 2" "" "Disable breakpoint 2"
>
> Maybe a comment on why this is being explicitly disabled because of
> Cygwin?
Breakpoint 2 is now the breakpoint at thread_function,
which is call for each newly created thread,
but we only care to have one of those threads, that is the reason why
I disabled it after getting one valid thread number.
> The other portions of the patch look OK to me.
>
> The patch has 29 passes on PPC as well.
Great, thanks for testing.
Pierre