public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Adam Jocksch <ajocksch@redhat.com>
To: Andrew Cagney <cagney@redhat.com>
Cc: frysk <frysk@sources.redhat.com>
Subject: Re: Trouble with frysk.expunit.Expect and fhpd
Date: Wed, 29 Aug 2007 22:30:00 -0000	[thread overview]
Message-ID: <46D5F37D.8040909@redhat.com> (raw)
In-Reply-To: <46D5C28C.20403@redhat.com>

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.

      reply	other threads:[~2007-08-29 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 18:40 Adam Jocksch
2007-08-29 19:01 ` Andrew Cagney
2007-08-29 22:30   ` Adam Jocksch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D5F37D.8040909@redhat.com \
    --to=ajocksch@redhat.com \
    --cc=cagney@redhat.com \
    --cc=frysk@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).