From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19310 invoked by alias); 29 Aug 2007 19:01:14 -0000 Received: (qmail 19300 invoked by uid 22791); 29 Aug 2007 19:01:13 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,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 19:01:08 +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 l7TJ15KW030729 for ; Wed, 29 Aug 2007 15:01:05 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7TJ15gP019390; Wed, 29 Aug 2007 15:01:05 -0400 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7TJ1424006844; Wed, 29 Aug 2007 15:01:05 -0400 Message-ID: <46D5C28C.20403@redhat.com> Date: Wed, 29 Aug 2007 19:01:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Adam Jocksch CC: frysk Subject: Re: Trouble with frysk.expunit.Expect and fhpd References: <46D5BD8F.8070003@redhat.com> In-Reply-To: <46D5BD8F.8070003@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/msg00367.txt.bz2 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. > I've also had fhpd hang when creating a display under expect, but I'm > currently unable to reproduce that problem. > > Adam > ------------------------------------------------------------------------ > > testHpdDisplayCommands(frysk.hpd.TestDisplayCommand) ---- startTest ---- > frysk.expunit.Expect@219d38 new /dev/pts/3 pid 7551 args [/home/ajocksch/build/frysk/frysk-core/frysk/bindir/fhpd, /home/ajocksch/build/frysk/frysk-core/frysk/pkglibdir/funit-rt-varchange] > frysk.expunit.Expect@219d38 find <<\(fhpd\) >> in <<>>? > frysk.expunit.Expect@219d38 poll for 5000 milliseconds > frysk.expunit.Expect@219d38 poll -> < (fhpd) >> giving < (fhpd) >> > frysk.expunit.Expect@219d38 find <<\(fhpd\) >> in < (fhpd) >>? > frysk.expunit.Expect@219d38 match <<(fhpd) >> > frysk.expunit.Expect@219d38 send < > frysk.expunit.Expect@219d38 find <> in <<>>? > frysk.expunit.Expect@219d38 poll for 5000 milliseconds > frysk.expunit.Expect@219d38 poll -> <> giving <> > frysk.expunit.Expect@219d38 find <> in <>? > frysk.expunit.Expect@219d38 poll for 5000 milliseconds > frysk.expunit.Expect@219d38 poll -> < >>> giving <>> >>> > frysk.expunit.Expect@219d38 find <> in < >>> ? >>>