This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] fix spurious FAIL in py-inferior.exp (x86-solaris)
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Fri, 4 Mar 2011 13:18:01 +0100 (CET)
- Subject: Re: [PATCH] fix spurious FAIL in py-inferior.exp (x86-solaris)
- References: <1299238268-32142-1-git-send-email-brobecker@adacore.com>
> 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.