From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3574 invoked by alias); 13 Mar 2009 15:28:06 -0000 Received: (qmail 3565 invoked by uid 22791); 13 Mar 2009 15:28:05 -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; Fri, 13 Mar 2009 15:27:28 +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 n2DFRRSd023698 for ; Fri, 13 Mar 2009 11:27:27 -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 n2DFRRap002385 for ; Fri, 13 Mar 2009 11:27:27 -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 n2DFRPNY002684 for ; Fri, 13 Mar 2009 11:27:26 -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 n2DFRNuM014118 for ; Fri, 13 Mar 2009 16:27:24 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.2/Submit) id n2DFRNw3014115 for gdb-patches@sourceware.org; Fri, 13 Mar 2009 16:27:23 +0100 Date: Fri, 13 Mar 2009 16:01:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] testsuite: Fix a racy FAIL on gdb.base/multi-forks.exp Message-ID: <20090313152723.GA13673@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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-03/txt/msg00207.txt.bz2 Hi, Fix a racy FAIL on gdb.base/multi-forks.exp . Instead of the output suppression by `close (1)' some sleep would also fix it if close (1) is not compatible enough. Thanks, Jan 13836 done [Switching to process 13836] 13839 done Breakpoint 2, main () at ../.././gdb/testsuite/gdb.base/multi-forks.c:35 35 exit (0); /* Set exit breakpoint here. */ (gdb) 13841 done 13842 done 13835 done 13844 done print pids 13845 done 13838 done 13846 done 13840 done 13834 done 13847 done 13843 done 13837 done 13833 done $1 = {0, 013826 done , 0, 0} (gdb) FAIL: gdb.base/multi-forks.exp: follow child, print pids gdb/testsuite/ 2009-03-13 Jan Kratochvil Fix a racy FAIL. * gdb.base/multi-forks.exp (follow child, print pids): Call `close (1)'. diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp index ac56fb0..70c1a20 100644 --- a/gdb/testsuite/gdb.base/multi-forks.exp +++ b/gdb/testsuite/gdb.base/multi-forks.exp @@ -66,6 +66,10 @@ global gdb_prompt # The result should be that each of the 4 forks returns zero. runto_main + +gdb_test "call close (1)" "= 0" \ + "Suppress the inferior output mixing with GDB output" + set exit_bp_loc [gdb_get_line_number "Set exit breakpoint here."] gdb_test "break $exit_bp_loc" "Breakpoint.* at .*" "Break at exit" gdb_test "set follow child" "" ""