public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fix SteppingEngine aborting when tasks have been only run(bz# 5482).
@ 2007-12-13  3:14 rmoseley
  0 siblings, 0 replies; only message in thread
From: rmoseley @ 2007-12-13  3:14 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  6e336c8e877a60dc82d621ae7f06f0c8dcb01099 (commit)
      from  1cc9d6f4bc5db27bf30ff59207d5588bf090495c (commit)

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

- Log -----------------------------------------------------------------
commit 6e336c8e877a60dc82d621ae7f06f0c8dcb01099
Author: Rick Moseley <rmoseley@localhost.localdomain>
Date:   Wed Dec 12 21:14:03 2007 -0600

    Fix SteppingEngine aborting when tasks have been only run(bz# 5482).
    
    SteppingEngine.java (updateTerminated): Fix bz #5482.
    TestKillCommand.java (testLoadKill): For testing bz #5482.

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

Summary of changes:
 frysk-core/frysk/hpd/ChangeLog                |    1 +
 frysk-core/frysk/hpd/TestKillCommand.java     |   24 ++++++++++++++++++++++--
 frysk-core/frysk/stepping/ChangeLog           |    4 ++++
 frysk-core/frysk/stepping/SteppingEngine.java |    5 +++--
 4 files changed, 30 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index f1326c3..4313944 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,6 +1,7 @@
 2007-12-12  Rick Moseley  <rmoseley@redhat.com>
 
 	* TestHpdTestHarness.java: New for testing bz #5480.
+	* TestKillCommand.java (testLoadKill): New for bz #5482.
 
 2007-12-11  Rick Moseley  <rmoseley@redhat.com>
 
diff --git a/frysk-core/frysk/hpd/TestKillCommand.java b/frysk-core/frysk/hpd/TestKillCommand.java
index 338ff8f..fd5571d 100644
--- a/frysk-core/frysk/hpd/TestKillCommand.java
+++ b/frysk-core/frysk/hpd/TestKillCommand.java
@@ -79,8 +79,9 @@ public class TestKillCommand extends TestLib {
          *  more than the set of commands you see here in one sequence.  Just 
          *  uncommenting the next 2 statements after this comment causes this 
          *  test to fail for no good reason.  A bug will be filed on this and the
-         *  lines can be uncommented when fixed.
-	e.send("run\n");
+         *  lines can be uncommented when fixed. */
+	/*
+	e.send(5, "run", "Attached to process*");
 	e.expect(5, "Attached to process*");
 	e.send("go\n");
 	e.expect(5, "Running process*");
@@ -93,4 +94,23 @@ public class TestKillCommand extends TestLib {
 	e.expect(5, "Quitting*"); */
 	e.close();
     }
+    
+    /**
+     * Test when all you have done is loaded/run the process and not
+     * have done a "go" on it.
+     */
+    public void testLoadKill() {
+	e = new HpdTestbed();
+	e.send("load " + Config.getPkgLibFile("funit-threads-looper").getPath()
+		+ "\n");
+	e.expect(5, "Loaded executable file*");
+	e.send("run\n");
+	e.expect(5, "Attached to process*");
+	e.send("kill\n");
+	e.expect(5, "Killing process*");
+	//e.send("quit\n");
+	//e.expect("Quitting*");
+	e.close();
+    }
+    
 }
diff --git a/frysk-core/frysk/stepping/ChangeLog b/frysk-core/frysk/stepping/ChangeLog
index 787279a..40001c8 100644
--- a/frysk-core/frysk/stepping/ChangeLog
+++ b/frysk-core/frysk/stepping/ChangeLog
@@ -1,3 +1,7 @@
+2007-12-12 Rick Moseley  <rmoseley@redhat.com>
+
+	* SteppingEngine.java (updateTerminated): Fix bz# 5482.
+
 2007-12-11  Andrew Cagney  <cagney@redhat.com>
 
 	* TestStepping.java: Update; DebugInfoFrame's .getLines() replaced
diff --git a/frysk-core/frysk/stepping/SteppingEngine.java b/frysk-core/frysk/stepping/SteppingEngine.java
index 9daaf4b..68584ca 100644
--- a/frysk-core/frysk/stepping/SteppingEngine.java
+++ b/frysk-core/frysk/stepping/SteppingEngine.java
@@ -1167,14 +1167,15 @@ public class SteppingEngine {
 	     * as terminated and notify the observers of the event. */
             Proc proc = task.getProc();
 	    Integer context = (Integer)SteppingEngine.this.contextMap.get(proc);
-	    SteppingEngine.this.contextMap.put(proc, new Integer(
+	    if (!SteppingEngine.this.contextMap.isEmpty())
+		SteppingEngine.this.contextMap.put(proc, new Integer(
 		    context.intValue() - 1));
 
             TaskStepEngine tse
                 = (TaskStepEngine)SteppingEngine.this.taskStateMap
                 .get(task);
             // Must have missed the terminating event
-            if (tse.isAlive()) {
+            if (tse != null && tse.isAlive()) {
                 tse.setState(new StepTerminatedState(task));
 
                 if (signal)


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-13  3:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-13  3:14 [SCM] master: Fix SteppingEngine aborting when tasks have been only run(bz# 5482) 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).