public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: rmoseley@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Fix TestKillCommand's expression parsing.
Date: Thu, 28 Feb 2008 21:14:00 -0000	[thread overview]
Message-ID: <20080228211447.14130.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  f2e18d6c724bca52c05b0c9e47ef3a0bc0454a6e (commit)
      from  3643b66d9a569802481310b2d76ed78412a306af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f2e18d6c724bca52c05b0c9e47ef3a0bc0454a6e
Author: Rick Moseley <rmoseley@dhcp-215.hsv.redhat.com>
Date:   Thu Feb 28 15:13:39 2008 -0600

    Fix TestKillCommand's expression parsing.
    
    * TestKillCommand.java: Fix regular expressions; add wait so
      test will successfully finish.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog            |    5 ++
 frysk-core/frysk/hpd/TestKillCommand.java |   68 ++++++++++++++++++++---------
 2 files changed, 52 insertions(+), 21 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 917fd09..8dc7053 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-28  Rick Moseley  <rmoseley@redhat.com>
+
+	* TestKillCommand.java: Fix regular expressions; add wait so 
+	test will successfully finish.
+
 2008-02-28  Tim Moore  <timoore@redhat.com>
 
 	* CLI.java (constructors): Take a Writer argument instead of a
diff --git a/frysk-core/frysk/hpd/TestKillCommand.java b/frysk-core/frysk/hpd/TestKillCommand.java
index 0d1decd..a0847ec 100644
--- a/frysk-core/frysk/hpd/TestKillCommand.java
+++ b/frysk-core/frysk/hpd/TestKillCommand.java
@@ -60,16 +60,15 @@ public class TestKillCommand extends TestLib {
 	} 
 	 */
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgLibFile("funit-threads-looper").getPath()
-		+ "\n");
-	e.expect("Loaded executable file*");
-	e.send("run\n");
-	e.expect("Attached to process*");
-	e.send("go\n");
-	e.expect("Running process*");
-	e.send("kill\n");
-	e.expect("Killing process*");
-	e.expect("Loaded executable file*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(),
+		"Loaded executable file.*");
+
+	e.sendCommandExpectPrompt("run", "Attached to process.*");
+	try { Thread.sleep(500); } catch (Exception e) { }
+	e.sendCommandExpectPrompt("go", "Running process.*");
+	try { Thread.sleep(500); } catch (Exception e) { }
+	e.sendCommandExpectPrompt("kill", "Killing process.*Loaded executable file.*");
+
 	/* Make sure you run again to make sure all has been cleaned up properly
 	 * from the last run.
 	 */
@@ -89,9 +88,25 @@ public class TestKillCommand extends TestLib {
 	e.expect("Killing process*");
 	e.expect("Loaded executable file*");
 	/* Make sure we can quit gracefully  */
-	/*
-	e.send("quit\n");
-	e.expect("Quitting*"); */
+	
+	/* adding the quit/Quitting statements causes this backtrace:
+	 * 
+	 *  frysk.expunit.EndOfFileException: end-of-file; expecting:  <<Quitting\.\.\..*>>; buffer <<java.lang.RuntimeException: {frysk.proc.live.LinuxPtraceTask@2fa6f255,pid=26380,tid=26381,state=StartClonedTask.blockedOffspring} in state "StartClonedTask.blockedOffspring" did not handle handleTerminatedEvent
+   at frysk.proc.live.State.unhandled(State.java:67)
+   at frysk.proc.live.LinuxPtraceTaskState.handleTerminatedEvent(LinuxPtraceTaskState.java:73)
+   at frysk.proc.live.LinuxPtraceTask.processTerminatedEvent(LinuxPtraceTask.java:233)
+   at frysk.proc.live.LinuxWaitBuilder.terminated(LinuxWaitBuilder.java:200)
+   at frysk.sys.Wait.wait(Wait.cxx:586)
+   at frysk.sys.Wait.wait(Wait.java:125)
+   at frysk.event.WaitEventLoop.block(WaitEventLoop.java:87)
+   at frysk.event.EventLoop.runEventLoop(EventLoop.java:377)
+   at frysk.event.EventLoop.run(EventLoop.java:487)
+   at frysk.bindir.fhpd.main(fhpd.java:171)
+
+	 */
+	
+	//e.send("quit\n");
+	//e.expect("Quitting\\.\\.\\..*");
 	e.close();
     }
     
@@ -101,15 +116,26 @@ public class TestKillCommand extends TestLib {
      */
     public void testLoadKill() {
 	e = new HpdTestbed();
-	e.send("load " + Config.getPkgLibFile("funit-threads-looper").getPath()
-		+ "\n");
-	e.expect("Loaded executable file*");
-	e.send("run\n");
-	e.expect("Attached to process*");
-	e.send("kill\n");
-	e.expect("Killing process*");
+	e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(),
+		"Loaded executable file.*");
+	e.sendCommandExpectPrompt("run", "Attached to process.*");
+	e.sendCommandExpectPrompt("kill", "Killing process.*");
+	/* Adding the quit/Quitting lines causes the following stack trace:
+	
+	frysk.expunit.EndOfFileException: end-of-file; expecting:  <<Quitting\.\.\..*>>; buffer <<Exception in thread "main" java.lang.RuntimeException: {frysk.proc.live.LinuxPtraceTask@2fa6f255,pid=26391,tid=26392,state=StartClonedTask.blockedOffspring} in state "StartClonedTask.blockedOffspring" did not handle handleTerminatedEvent
+	   at frysk.proc.live.State.unhandled(State.java:67)
+	   at frysk.proc.live.LinuxPtraceTaskState.handleTerminatedEvent(LinuxPtraceTaskState.java:73)
+	   at frysk.proc.live.LinuxPtraceTask.processTerminatedEvent(LinuxPtraceTask.java:233)
+	   at frysk.proc.live.LinuxWaitBuilder.terminated(LinuxWaitBuilder.java:200)
+	   at frysk.sys.Wait.wait(Wait.cxx:586)
+	   at frysk.sys.Wait.wait(Wait.java:125)
+	   at frysk.event.WaitEventLoop.block(WaitEventLoop.java:87)
+	   at frysk.event.EventLoop.runEventLoop(EventLoop.java:377)
+	   at frysk.event.EventLoop.run(EventLoop.java:487)
+	   at frysk.bindir.fhpd.main(fhpd.java:171) */
+
 	//e.send("quit\n");
-	//e.expect("Quitting*");
+	//e.expect("Quitting\\.\\.\\..*");
 	e.close();
     }
     


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-02-28 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080228211447.14130.qmail@sourceware.org \
    --to=rmoseley@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@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).