This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trouble with frysk.expunit.Expect and fhpd


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 -> <<Attached to process 7554
(fhpd) >> giving <<Attached to process 7554
(fhpd) >>
frysk.expunit.Expect@219d38 find <<\(fhpd\) >> in <<Attached to process 7554
(fhpd) >>?
frysk.expunit.Expect@219d38 match <<(fhpd) >>
frysk.expunit.Expect@219d38 send <<break #funit-rt-varchange.c#53
frysk.expunit.Expect@219d38 find <<breakpoint.*\(fhpd\) >> in <<>>?
frysk.expunit.Expect@219d38 poll for 5000 milliseconds
frysk.expunit.Expect@219d38 poll -> <<break #funit-rt->> giving <<break #funit-rt->>
frysk.expunit.Expect@219d38 find <<breakpoint.*\(fhpd\) >> in <<break #funit-rt->>?
frysk.expunit.Expect@219d38 poll for 5000 milliseconds
frysk.expunit.Expect@219d38 poll -> <<varchange.c#53
giving <<break #funit-rt-varchange.c#53

frysk.expunit.Expect@219d38 find <<breakpoint.*\(fhpd\) >> in <<break #funit-rt-varchange.c#53
?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]