public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Eliminate ProcCoreAction.
@ 2008-03-17 18:39 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-03-17 18:39 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  108ba4fc6bbb312908af356faf3455b53b49424a (commit)
      from  d272f9c38573bfe8c0d0bf54d114e3be7f3cf16c (commit)

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

- Log -----------------------------------------------------------------
commit 108ba4fc6bbb312908af356faf3455b53b49424a
Author: Andrew Cagney <cagney@redhat.com>
Date:   Mon Mar 17 14:02:25 2008 -0400

    Eliminate ProcCoreAction.
    
    frysk-core/frysk/proc/ChangeLog
    2008-03-17  Andrew Cagney  <cagney@redhat.com>
    
    	* ProcCoreAction.java: Delete.
    
    frysk-core/frysk/proc/dead/ChangeLog
    2008-03-17  Andrew Cagney  <cagney@redhat.com>
    
    	* TestLinuxCore.java (actionCoreProc()): New; replace
    	ProcCoreAction.
    
    frysk-core/frysk/util/ChangeLog
    2008-03-17  Andrew Cagney  <cagney@redhat.com>
    
    	* TestStackTraceAction.java (testCore()): Delete; tested by core
    	code.

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

Summary of changes:
 frysk-core/frysk/proc/ChangeLog                 |    2 +
 frysk-core/frysk/proc/ProcCoreAction.java       |   63 -----------------------
 frysk-core/frysk/proc/dead/ChangeLog            |    7 +++
 frysk-core/frysk/proc/dead/TestLinuxCore.java   |   18 +++++--
 frysk-core/frysk/util/ChangeLog                 |    3 +
 frysk-core/frysk/util/TestStackTraceAction.java |   21 --------
 6 files changed, 26 insertions(+), 88 deletions(-)
 delete mode 100644 frysk-core/frysk/proc/ProcCoreAction.java

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 8099464..8713bce 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,5 +1,7 @@
 2008-03-17  Andrew Cagney  <cagney@redhat.com>
 
+	* ProcCoreAction.java: Delete.
+
 	* HostObserver.java: Delete.
 
 	* TaskObserver.java (Attached): Move to ...
diff --git a/frysk-core/frysk/proc/ProcCoreAction.java b/frysk-core/frysk/proc/ProcCoreAction.java
deleted file mode 100644
index 1ef68e0..0000000
--- a/frysk-core/frysk/proc/ProcCoreAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2007, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.proc;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-
-public class ProcCoreAction
-{
-
-  public ProcCoreAction (Proc proc, ProcObserver.ProcAction action)
-  {
-    LinkedList taskList = proc.getTasks();
-    
-    Iterator iterator = taskList.iterator();
-    
-    while (iterator.hasNext())
-      {
-        Task task = (Task) iterator.next();
-        action.existingTask(task);
-      }
-    
-    action.allExistingTasksCompleted();
-  }
-
-}
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index 4f8ff90..93efe35 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,8 +1,15 @@
+2008-03-17  Andrew Cagney  <cagney@redhat.com>
+
+	* TestLinuxCore.java (actionCoreProc()): New; replace
+	ProcCoreAction.
+
 2008-03-17  Phil Muldoon  <pmuldoon@redhat.com>
+	
 	* TestCorefileByteBuffer.java (testCorefileByteBufferSlice): Use
 	getBytes(). Test for null returns.
 
 2008-03-17  Andrew Cagney  <cagney@redhat.com>
+	
 	* DeadHost.java: Update; using TaskAttachedObserverXXX;
 	* TestLinuxCore.java: Update.
 	* DeadTask.java: Ditto.
diff --git a/frysk-core/frysk/proc/dead/TestLinuxCore.java b/frysk-core/frysk/proc/dead/TestLinuxCore.java
index a35f5a7..32fb7f6 100644
--- a/frysk-core/frysk/proc/dead/TestLinuxCore.java
+++ b/frysk-core/frysk/proc/dead/TestLinuxCore.java
@@ -44,8 +44,9 @@ import frysk.proc.TaskAttachedObserverXXX;
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-
+import frysk.proc.ProcObserver;
 import lib.dwfl.Dwfl;
+import java.util.Iterator;
 import lib.dwfl.DwflModule;
 import lib.dwfl.SymbolBuilder;
 import frysk.config.Config;
@@ -60,7 +61,6 @@ import frysk.proc.Manager;
 import frysk.proc.MemoryMap;
 import frysk.proc.Proc;
 import frysk.proc.ProcBlockAction;
-import frysk.proc.ProcCoreAction;
 import frysk.proc.Task;
 import frysk.proc.TaskObserver;
 import frysk.testbed.CorefileFactory;
@@ -128,7 +128,7 @@ public class TestLinuxCore extends TestLib {
 	    };
 	
 	// And run ....
-	new ProcCoreAction(coreProc, coreStacktrace);
+	actionCoreProc(coreProc, coreStacktrace);
 	assertRunUntilStop("Perform corefile Backtrace");
 
 	String mainThread = "Task #\\d+\n" + 
@@ -253,7 +253,7 @@ public class TestLinuxCore extends TestLib {
     };
 
     // And run ....
-    new ProcCoreAction(coreProc, coreStacktrace);
+    actionCoreProc(coreProc, coreStacktrace);
     assertRunUntilStop("Perform corefile Backtrace");
 
     // Check that the dead process stacktrace produces something. If
@@ -619,4 +619,14 @@ public class TestLinuxCore extends TestLib {
     }
   }
 
+    /**
+     * Apply a core-file to a proc-block-action.
+     */
+    private void actionCoreProc(Proc proc, ProcObserver.ProcAction action) {
+	for (Iterator i = proc.getTasks().iterator(); i.hasNext(); ) {
+	    Task task = (Task) i.next();
+	    action.existingTask(task);
+	}
+	action.allExistingTasksCompleted();
+    }
 }
diff --git a/frysk-core/frysk/util/ChangeLog b/frysk-core/frysk/util/ChangeLog
index 6359a13..dc63d70 100644
--- a/frysk-core/frysk/util/ChangeLog
+++ b/frysk-core/frysk/util/ChangeLog
@@ -1,5 +1,8 @@
 2008-03-17  Andrew Cagney  <cagney@redhat.com>
 
+	* TestStackTraceAction.java (testCore()): Delete; tested by core
+	code.
+
 	* ProcRunUtil.java: Update; using TaskAttachedObserverXXX.
 
 2008-03-13  Stan Cox  <scox@redhat.com>
diff --git a/frysk-core/frysk/util/TestStackTraceAction.java b/frysk-core/frysk/util/TestStackTraceAction.java
index ae5e244..1458f43 100644
--- a/frysk-core/frysk/util/TestStackTraceAction.java
+++ b/frysk-core/frysk/util/TestStackTraceAction.java
@@ -43,14 +43,11 @@ package frysk.util;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import frysk.rsl.Log;
-import frysk.config.Config;
 import frysk.debuginfo.PrintStackOptions;
 import frysk.event.RequestStopEvent;
 import frysk.proc.Manager;
 import frysk.proc.Proc;
 import frysk.proc.ProcBlockAction;
-import frysk.proc.ProcCoreAction;
-import frysk.proc.dead.LinuxCoreFactory;
 import frysk.testbed.TestLib;
 import frysk.testbed.SlaveOffspring;
 
@@ -132,22 +129,4 @@ public class TestStackTraceAction extends TestLib {
                result.matches(regex));
 
   }
-  
-    public void testCore() {
-	if (unresolved(4581))
-	    return;
-	StringWriter stringWriter = new StringWriter();
-	Proc proc = LinuxCoreFactory.createProc(Config.getPkgDataFile("test-core-x86"));
-	assertNotNull("core proc", proc);
-	StacktraceAction stacker;
-	stacker = new StacktraceAction(new PrintWriter(stringWriter),proc, new RequestStopEvent(Manager.eventLoop),options) {
-		
-		public void addFailed (Object observable, Throwable w) {
-		    fail("Proc add failed: " + w.getMessage());
-		}
-	    };
-	new ProcCoreAction (proc, stacker);
-	assertRunUntilStop("perform backtrace");
-	assertNotNull("has backtrace?", stringWriter.getBuffer().toString());
-    }
 }


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


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

only message in thread, other threads:[~2008-03-17 18:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-17 18:39 [SCM] master: Eliminate ProcCoreAction cagney

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).