From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16475 invoked by alias); 29 Aug 2007 22:30:36 -0000 Received: (qmail 16464 invoked by uid 22791); 29 Aug 2007 22:30:35 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS,TW_FH X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Aug 2007 22:30:30 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7TMUSwC004342 for ; Wed, 29 Aug 2007 18:30:28 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7TMURW6019388; Wed, 29 Aug 2007 18:30:28 -0400 Received: from localhost.localdomain (vpn-14-207.rdu.redhat.com [10.11.14.207]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l7TMUQQF029696; Wed, 29 Aug 2007 18:30:27 -0400 Message-ID: <46D5F37D.8040909@redhat.com> Date: Wed, 29 Aug 2007 22:30:00 -0000 From: Adam Jocksch User-Agent: Thunderbird 2.0.0.4 (X11/20070615) MIME-Version: 1.0 To: Andrew Cagney CC: frysk Subject: Re: Trouble with frysk.expunit.Expect and fhpd References: <46D5BD8F.8070003@redhat.com> <46D5C28C.20403@redhat.com> In-Reply-To: <46D5C28C.20403@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00369.txt.bz2 Andrew Cagney wrote: > Adam Jocksch wrote: >> I've been trying to re-tool frysk.hpd.TestDisplayCommand to use >> funit-rt-varchange instead of hpd-c (bug #4951). However, the expect >> script fails when fhpd doesn't behave as expected when adding a >> breakpoint. I've attached the revised version of >> TestDisplayCommand.java as well as the log created by ./TestRunner >> -log frysk=FINE frysk.hpd.TestDisplayCommand. Running >> 'frysk/bindir/fhpd frysk/pkglibdir/funit-rt-varchange' from the >> frysk-core directory produces the expected results; it's only under >> Expect that fhpd is functioning strangely. >> > see: http://sourceware.org/bugzilla/show_bug.cgi?id=4914 and 4919 ; > missting synchronization in fhpd can lead to expunit can feeding it > commands to fast. Try adding a sleep(5) after the run, but before the > breakpoint is set; something like: > > e.send("run " + Config.getPkgLibFile("funit-stepping-asm") + > "\n"); > e.expect(5, "Attached.*\n" + prompt); > > // Remove this - #4919 and #4914. > try { Thread.sleep(2000); } catch (Exception e) {} > > e.send("break #" + source + "#" + startLine + "\n"); > e.expect("breakpoint.*\n" + prompt); > > if this lets it work, keep the sleep and mark the test as > unresolved(4914). We can then still run it with --unresolved. > Awesome, that worked like a charm. It also fixed the error with creating displays through expect. However in my testcase I don't send run to fhpd, rather I execute fhpd with the executable as an argument. For right now TestDisplayCommands is marked unresolved(4941) and passes and I have filed bz#4982 re: removing the sleep statements. If need be I can create a new bug for this race condition and change TestDisplayCommands appropriately.