From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31917 invoked by alias); 20 Jun 2011 15:12:04 -0000 Received: (qmail 31907 invoked by uid 22791); 20 Jun 2011 15:12:03 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jun 2011 15:11:43 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5KFBhwV002918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Jun 2011 11:11:43 -0400 Received: from dhcp-25-89.brq.redhat.com (pdp-11.brq.redhat.com [10.34.24.63]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5KFBg3w007161 for ; Mon, 20 Jun 2011 11:11:42 -0400 Message-ID: <4DFF632D.6020804@redhat.com> Date: Mon, 20 Jun 2011 15:12:00 -0000 From: Marek Polacek User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat Thunderbird/3.1.3 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [PATCH] gdb.mi/mi-nsmoribund.exp: fix racy tests (PR testsuite/12649) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 2011-06/txt/msg00264.txt.bz2 The problem here is again the gdb_test_multiple. Fixed thusly. Tested with read{,1}. OK? 2011-06-20 Marek Polacek * gdb.mi/mi-nsmoribund.exp: Replace gdb_test_multiple with mi_gdb_test. --- gdb/gdb/testsuite/gdb.mi/mi-nsmoribund.exp.mp 2011-05-27 14:36:48.000000000 +0200 +++ gdb/gdb/testsuite/gdb.mi/mi-nsmoribund.exp 2011-06-20 17:04:43.355984345 +0200 @@ -82,15 +82,13 @@ mi_create_breakpoint "-p 5 $srcfile:$bkp # Resume all threads. Only thread 5 should report a stop. set running_re "" -for {set i $nthreads} {$i > 0} {incr i -1} { +for {set i $nthreads} {$i > 1} {incr i -1} { set running_re "$running_re\\*running,thread-id=\"$decimal\"\r\n" } +# Don't append \r\n after last line. +set running_re "$running_re\\*running,thread-id=\"$decimal\"" -gdb_test_multiple "-exec-continue --all" "resume all, thread specific breakpoint" { - -re ".*$running_re$mi_gdb_prompt" { - pass "resume all, thread specific breakpoint" - } -} +mi_gdb_test "-exec-continue --all" "\[^\n\]*\r\n$running_re" "resume all, thread specific breakpoint" mi_expect_stop "breakpoint-hit" "thread_function" "\[^\n\]*" "$srcfile" \ "\[0-9\]*" {"" "disp=\"keep\""} "hit thread specific breakpoint"