public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
From: "pmuldoon at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: frysk-bugzilla@sourceware.org
Subject: [Bug general/5735] testCoreThenRunCommand(frysk.hpd.TestCoreCommand) test fails
Date: Wed, 06 Feb 2008 09:35:00 -0000	[thread overview]
Message-ID: <20080206093454.23235.qmail@sourceware.org> (raw)
In-Reply-To: <20080206091611.5735.pmuldoon@redhat.com>


------- Additional Comments From pmuldoon at redhat dot com  2008-02-06 09:34 -------
I noticed that the test before it:

    public void testCoreExeCommand() {
	File exe = Config.getPkgLibFile("funit-hello");
	File core = CorefileFactory.constructCoreAtSignal(exe);
	e = new HpdTestbed();
	e.sendCommandExpectPrompt(("core " + core.getPath()
				   + " " + exe.getPath()),
				  "Attached to core file.*");
    }

Was essentially the same as the testCoreThenRunCommand, other than this
additional line in the testCoreThenRunCommand:

	e.sendCommandExpectPrompt("run",
				  "Attached to process.*");

On removing this the test files passes 100 out of 100 runs.

The whole of the test is:

    public void testCoreThenRunCommand() {
	File exe = Config.getPkgLibFile("funit-hello");
	File core = CorefileFactory.constructCoreAtSignal(exe);
	e = new HpdTestbed();
	e.sendCommandExpectPrompt(("core " + core.getPath()
				   + " " + exe.getPath()),
				  "Attached to core file.*");
	e.sendCommandExpectPrompt("run",
				  "Attached to process.*");
    }

Looking at the live load/run case in TestRunCommand.java, which is testing the
same functionality the test is differently constructed. Not the different expect
output and the thread.sleep(). I'll convert the corefile test to this one to see
if it passes with the different expect, and thread.sleep().

    public void testRunCommand() {
	e = new HpdTestbed();
	e.sendCommandExpectPrompt("load " +
Config.getPkgLibFile("funit-threads-looper").getPath(),
	"Loaded executable file.*");
	e.sendCommandExpectPrompt("run ",
		"Attached to process ([0-9]+).*Running process ([0-9]+).*");
	try { Thread.sleep(1000); } catch (Exception e) {}
	e.sendCommandExpectPrompt("focus","Target set.*\\[0\\.0\\]\t\t([0-9]+)" +
		"\t([0-9]+)\r\n" + "\\[0\\.1\\]\t\t([0-9]+)\t([0-9]+)\r\n");
	e.send("quit\n");
	e.expect("Quitting\\.\\.\\.");
	e.close();
    }



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5735

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


  reply	other threads:[~2008-02-06  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06  9:16 [Bug general/5735] New: " pmuldoon at redhat dot com
2008-02-06  9:35 ` pmuldoon at redhat dot com [this message]
2008-02-06 10:39 ` [Bug general/5735] " pmuldoon at redhat dot com
2008-02-06 10:51 ` pmuldoon at redhat dot com

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=20080206093454.23235.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=frysk-bugzilla@sourceware.org \
    /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).