RE: [RFC/RFA] testsuite/gdb.base/watch_thread_num.exp: Fix test for systems having hidden threads

Pierre Muller
2007-12-19T14:01:06Z

> -----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