public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM] master: Fix TestKillCommand's expression parsing.
@ 2008-02-28 21:14 rmoseley
0 siblings, 0 replies; only message in thread
From: rmoseley @ 2008-02-28 21:14 UTC (permalink / raw)
To: frysk-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-28 21:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 21:14 [SCM] master: Fix TestKillCommand's expression parsing rmoseley
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).