From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22238 invoked by alias); 4 Mar 2011 12:18:26 -0000 Received: (qmail 22229 invoked by uid 22791); 4 Mar 2011 12:18:25 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 12:18:20 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p24CI2ib004257; Fri, 4 Mar 2011 13:18:02 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p24CI1vS028257; Fri, 4 Mar 2011 13:18:01 +0100 (CET) Date: Fri, 04 Mar 2011 12:18:00 -0000 Message-Id: <201103041218.p24CI1vS028257@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org, brobecker@adacore.com In-reply-to: <1299238268-32142-1-git-send-email-brobecker@adacore.com> (message from Joel Brobecker on Fri, 4 Mar 2011 15:31:08 +0400) Subject: Re: [PATCH] fix spurious FAIL in py-inferior.exp (x86-solaris) References: <1299238268-32142-1-git-send-email-brobecker@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00286.txt.bz2 > From: Joel Brobecker > 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.