This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix spurious FAIL in py-inferior.exp (x86-solaris)


> From: Joel Brobecker <brobecker@adacore.com>
> Date: Fri,  4 Mar 2011 15:31:08 +0400
> 
> The inferior is single-threaded, but on x86-solaris, GDB says
> that the program has two entries in the thread list:
> 
>     (gdb) info threads
>       Id   Target Id         Frame
>     * 2    Thread 1 (LWP 1)  f2 (a=1) at /[...]/py-inferior.c:20
>       1    LWP    1          f2 (a=1) at /[...]/py-inferior.c:20
> 
> As a result, the test that prints the list of threads trips
> because the expected output assumes only one thread.

That's a bug in the Solaris thread support. So...

> The regular expression I used to match is a little complicated because
> of the case where there is only one element -vs- the case where there
> is more than one.  In the first case, the last element is followed by
> a comma.  In the second case, it's not.  I tried to make it easier
> to read by using a variable that factorizes the expression matching
> a thread object, as well as makes it shorter and easier to read.

...I think you should not adjust the testsuite for this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]