From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19850 invoked by alias); 22 Jun 2011 11:26:44 -0000 Received: (qmail 19836 invoked by uid 22791); 22 Jun 2011 11:26:42 -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; Wed, 22 Jun 2011 11:26:19 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5MBQJWK031280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Jun 2011 07:26:19 -0400 Received: from dhcp-25-89.brq.redhat.com (pdp-11.brq.redhat.com [10.34.24.63]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5MBQI0G011270 for ; Wed, 22 Jun 2011 07:26:18 -0400 Message-ID: <4E01D159.1030602@redhat.com> Date: Wed, 22 Jun 2011 11:26: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/mi2-console.exp: fix racy test (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/msg00292.txt.bz2 Use mi_gdb_test in place of gdb_test_multiple. Note, that I had to add "()?" around the first \r\n. The reason is that mi_gdb_test appends \r\n itself, but the "*running,thread-id=all" part is not mandatory. Tested with both read{,1}. OK to apply? 2011-06-22 Marek Polacek * gdb.mi/mi2-console.exp: Replace gdb_test_multiple with mi_gdb_test. --- gdb/gdb/testsuite/gdb.mi/mi2-console.exp.mp 2011-06-22 12:58:23.697574353 +0200 +++ gdb/gdb/testsuite/gdb.mi/mi2-console.exp 2011-06-22 13:16:48.577665717 +0200 @@ -48,11 +48,8 @@ if { [gdb_compile "${srcdir}/${subdir}/ mi_run_to_main # Next over the hello() call which will produce lots of output -gdb_test_multiple "220-exec-next" "Started step over hello" { - -re "220\\^running\r\n(\\*running,thread-id=\"all\"\r\n)?$mi_gdb_prompt" { - pass "Started step over hello" - } -} +mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \ + "Started step over hello" if { ![target_info exists gdb,noinferiorio] } { gdb_expect {