From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20054 invoked by alias); 29 Sep 2011 12:48:14 -0000 Received: (qmail 20044 invoked by uid 22791); 29 Sep 2011 12:48:14 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Thu, 29 Sep 2011 12:47:36 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8TClatx017765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Sep 2011 08:47:36 -0400 Received: from dhcp-25-89.brq.redhat.com (pdp-11.brq.redhat.com [10.34.24.63]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8TClZZV010296 for ; Thu, 29 Sep 2011 08:47:35 -0400 Message-ID: <4E8468E6.2070208@redhat.com> Date: Thu, 29 Sep 2011 13:00: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.base/foll-fork.exp: fix up race (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-09/txt/msg00529.txt.bz2 This test with read1 failed: FAIL: gdb.base/foll-fork.exp: set follow-fork child, cleanup (got interactive prompt) ERROR: breakpoints not deleted UNRESOLVED: gdb.base/foll-fork.exp: setting breakpoint at main The problem is that we didn't match the whole question "Delete all..." properly. Fixed by adding anchor "y or n" explicitly. Tested with both read{,1}. Ok to apply? 2011-09-29 Marek Polacek * gdb.base/foll-fork.exp: Fix race by adding "y or n" to the matching pattern. --- gdb/gdb/testsuite/gdb.base/foll-fork.exp.mp 2011-09-29 14:20:10.812542562 +0200 +++ gdb/gdb/testsuite/gdb.base/foll-fork.exp 2011-09-29 14:32:13.185543609 +0200 @@ -168,7 +168,7 @@ proc catch_fork_child_follow {} { gdb_test "delete breakpoints" \ "" \ "set follow-fork child, cleanup" \ - "Delete all breakpoints.*$" \ + "Delete all breakpoints.*y or n.*$" \ "y" } @@ -255,7 +255,7 @@ proc tcatch_fork_parent_follow {} { gdb_test "delete breakpoints" \ "" \ "set follow-fork parent, cleanup" \ - "Delete all breakpoints.*$" \ + "Delete all breakpoints.*y or n.*$" \ "y" } Marek