public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Use teardownfile and corefile at signal.
@ 2008-01-16 10:44 pmuldoon
  0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2008-01-16 10:44 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  91e87264dce077b98101920e0ec5c8eb867fbcd2 (commit)
      from  26aa2cd53bd6f4f9dbdf542d2969686776489fcc (commit)

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

- Log -----------------------------------------------------------------
commit 91e87264dce077b98101920e0ec5c8eb867fbcd2
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Wed Jan 16 10:44:15 2008 +0000

    Use teardownfile and corefile at signal.
    
    2008-01-16  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* TestLinuxCore.java (testInsertedBreakpoint): Use TearDownFile.
    	(testLinuxCoreFileStackTrace): Ditto. Also use CorefileAtSignal.

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

Summary of changes:
 frysk-core/frysk/proc/dead/ChangeLog          |    5 +++++
 frysk-core/frysk/proc/dead/TestLinuxCore.java |   19 +++++++++----------
 2 files changed, 14 insertions(+), 10 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index a2b9f66..eaf0c11 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-16  Phil Muldoon  <pmuldoon@redhat.com> 
+
+	* TestLinuxCore.java (testInsertedBreakpoint): Use TearDownFile.
+	(testLinuxCoreFileStackTrace): Ditto. Also use CorefileAtSignal.
+
 2008-01-15  Andrew Cagney  <cagney@redhat.com>
 
 	* LinuxCoreTask.java (getMemory()): Replace sendrecMemory().
diff --git a/frysk-core/frysk/proc/dead/TestLinuxCore.java b/frysk-core/frysk/proc/dead/TestLinuxCore.java
index fd6cf43..1738bc9 100644
--- a/frysk-core/frysk/proc/dead/TestLinuxCore.java
+++ b/frysk-core/frysk/proc/dead/TestLinuxCore.java
@@ -64,8 +64,10 @@ import frysk.proc.ProcCoreAction;
 import frysk.proc.ProcId;
 import frysk.proc.Task;
 import frysk.proc.TaskObserver;
+import frysk.testbed.CoreFileAtSignal;
 import frysk.testbed.DaemonBlockedAtSignal;
 import frysk.testbed.LegacyOffspring;
+import frysk.testbed.TearDownFile;
 import frysk.testbed.TestLib;
 import frysk.util.CoredumpAction;
 import frysk.util.StacktraceAction;
@@ -143,12 +145,11 @@ public class TestLinuxCore
    **/
   public void testLinuxCoreFileStackTrace () {
    
-    Proc testProc;
-    
+
     // Create a blocked process, blocked at a signal
     File exeFile = Config.getPkgLibFile("funit-stacks");
-    testProc = new DaemonBlockedAtSignal(exeFile).getMainTask().getProc();
-
+    Proc testProc = new DaemonBlockedAtSignal(exeFile).getMainTask().getProc();
+    TearDownFile coreFile = (TearDownFile) CoreFileAtSignal.constructCore(testProc);
 
     StacktraceAction liveStacktrace;
     StacktraceAction coreStacktrace;
@@ -179,11 +180,8 @@ public class TestLinuxCore
     assertTrue("Live stack trace is not  empty", 
 	       liveStackOutput.getBuffer().length() > 0);
 
-    // Create a  corefile from blocked process, and model.
-    String coreFileName = constructCore(testProc);
-    File testCore = new File(coreFileName);
     Host coreHost = new LinuxCoreHost(Manager.eventLoop, 
-				  testCore, exeFile);
+				  coreFile, exeFile);
     Proc coreProc = coreHost.getProc(new ProcId(testProc.getPid()));
 
     // Create a stackktrace of a the corefile process
@@ -214,7 +212,6 @@ public class TestLinuxCore
 		 liveStackOutput.getBuffer().toString(),
 		 coreStackOutput.getBuffer().toString());
 
-    testCore.delete();
   }
 
   private static class PrintEvent implements Event
@@ -409,7 +406,9 @@ public class TestLinuxCore
 
     // Create a core file from the process and load it back in.
     String coreFileName = constructCore(ackProc);
-    File xtestCore = new File(coreFileName);
+    
+    // Create a teardown file
+    TearDownFile xtestCore = new TearDownFile(coreFileName);
     Host lcoreHost = new LinuxCoreHost(Manager.eventLoop,
 				       xtestCore, new File(ackProc.getExe()));
     Proc coreProc = lcoreHost.getProc(new ProcId(ackProc.getPid()));


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


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

only message in thread, other threads:[~2008-01-16 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16 10:44 [SCM] master: Use teardownfile and corefile at signal pmuldoon

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