From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17329 invoked by alias); 13 Jun 2008 20:10:10 -0000 Received: (qmail 17319 invoked by uid 22791); 13 Jun 2008 20:10:09 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Jun 2008 20:09:52 +0000 Received: (qmail 15688 invoked from network); 13 Jun 2008 20:09:50 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Jun 2008 20:09:50 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: [commit] Robustify mi-simplerun. Date: Fri, 13 Jun 2008 21:08:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sources.redhat.com References: <200806132355.42833.vladimir@codesourcery.com> <20080613200035.GA31920@caradoc.them.org> In-Reply-To: <20080613200035.GA31920@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806140010.05202.vladimir@codesourcery.com> 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: 2008-06/txt/msg00247.txt.bz2 On Saturday 14 June 2008 00:00:35 Daniel Jacobowitz wrote: > On Fri, Jun 13, 2008 at 11:55:42PM +0400, Vladimir Prus wrote: > > The program been run by this testcase produces output. Since GDB prints > > the *running notification, and the prompt, after actually resuming the program, > > there's a race condition -- the program may produce the output before gdb prints > > the prompt, which breaks the test. This patch add artificial delay to the > > program to make sure gdb print the prompt first. > > Is the output necessary for any test? If not, can we just remove it? > Sleep is bad. Someone'll run the testsuite on a machine with load > (e.g. our nightly tester) and it'll fail again. I cannot find any evidence that the output is directly tested for. There are some tests that rely on the presence of the code statements that produce this output, so just removing those prints will be more work. Do you actually think high load will break this? Essentially, we only need gdb to grab a single slice of processor time before the debugged program gets to printing, and I'd expect it will, during that second. - Volodya