From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30448 invoked by alias); 30 Jun 2009 18:23:53 -0000 Received: (qmail 30440 invoked by uid 22791); 30 Jun 2009 18:23:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 18:23:45 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5UINhTV031994 for ; Tue, 30 Jun 2009 14:23:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5UINcqc016143 for ; Tue, 30 Jun 2009 14:23:42 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5UINa4O007695 for ; Tue, 30 Jun 2009 14:23:37 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n5UINaN5030799 for ; Tue, 30 Jun 2009 20:23:36 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n5UINYdP030782 for gdb-patches@sourceware.org; Tue, 30 Jun 2009 20:23:34 +0200 Date: Tue, 30 Jun 2009 18:23:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] testsuite: Fix racy gdb.mi/mi-nsthrexec.exp FAIL Message-ID: <20090630182334.GA30261@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes 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: 2009-06/txt/msg00883.txt.bz2 Hi, seen the dump below for unstable results for: gdb.mi/mi-nsthrexec.exp: thread state, all stopped the general .* match just aligns the function to existing get_mi_thread_list or check_mi_and_console_threads expect strings. Thanks, Jan @@ -59880,10 +59843,9 @@ Expecting: ^(-thread-info[ ]+[(]gdb[)] [ ]*) -thread-info -~"Current language: auto; currently asm\n" -^done,threads=[{id="2",target-id="Thread 0x7f2462b8d910 (LWP 9535)",frame={level="0",addr="0x0000000000400668",func="thread_execler",args=[{name="arg",value="0x0"}],file="../.././gdb/testsuite/gdb.mi/nsthrexec.c",fullname="/home/jkratoch/redhat/gdb-master/gdb/testsuite/gdb.mi/nsthrexec.c",line="28"},state="stopped"},{id="1",target-id="Thread 0x7f24635a56f0 (LWP 9296)",frame={level="0",addr="0x00007f246318da7f",func="__lll_unlock_wake_private",args=[],file="../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S",fullname="/usr/src/debug/glibc-20090510T1842/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S",line="336"},state="stopped"}],current-thread-id="1" +^done,threads=[{id="2",target-id="Thread 0x7f327a926910 (LWP 14350)",frame={level="0",addr="0x0000000000400668",func="thread_execler",args=[{name="arg",value="0x0"}],file="../.././gdb/testsuite/gdb.mi/nsthrexec.c",fullname="/home/jkratoch/redhat/gdb-master/gdb/testsuite/gdb.mi/nsthrexec.c",line="28"},state="stopped"},{id="1",target-id="Thread 0x7f327b33e6f0 (LWP 14301)",frame={level="0",addr="0x00007f327af20b0d",func="pthread_join",args=[{name="threadid",value="139854781507856"},{name="thread_return",value="0x0"}],file="pthread_join.c",fullname="/usr/src/debug/glibc-20090510T1842/nptl/pthread_join.c",line="89"},state="stopped"}],current-thread-id="1" (gdb) -FAIL: gdb.mi/mi-nsthrexec.exp: thread state, all stopped +PASS: gdb.mi/mi-nsthrexec.exp: thread state, all stopped 102-break-delete 102^done (gdb) gdb/testsuite/ 2009-06-30 Jan Kratochvil * lib/mi-support.exp (mi_check_thread_states): Permit any output before the expected result record. --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1808,7 +1808,7 @@ proc mi_reverse_list { list } { proc mi_check_thread_states { xstates test } { global expect_out set states [mi_reverse_list $xstates] - set pattern "\\^done,threads=\\\[" + set pattern ".*\\^done,threads=\\\[" foreach s $states { set pattern "${pattern}(.*)state=\"$s\"" }