frysk.proc.dead
Class TestLinuxCore

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by frysk.junit.TestCase
              extended by frysk.testbed.TestLib
                  extended by frysk.proc.dead.TestLinuxCore
All Implemented Interfaces:
Test

public class TestLinuxCore
extends TestLib


Nested Class Summary
(package private) static class TestLinuxCore.AttachedObserver
           
(package private) static class TestLinuxCore.CodeObserver
           
private static class TestLinuxCore.PrintEvent
           
(package private) static class TestLinuxCore.Symbol
           
 
Field Summary
private  Proc coreProc
           
 
Fields inherited from class frysk.testbed.TestLib
host
 
Constructor Summary
TestLinuxCore()
           
 
Method Summary
private  void actionCoreProc(Proc proc, ProcBlockObserver action)
          Apply a core-file to a proc-block-action.
private  String constructCore(Proc ackProc)
          Given a Proc object, generate a core file from that given proc.
private  int findCoreMap(long address, MemoryMap[] maps)
           
private static long getFunctionEntryAddress(Proc proc, String func)
          Returns the address of the requested function through query Dwfl of the main Task of the given Proc.
protected  Proc giveMeAProc()
          Generate a process suitable for attaching to (ie detached when returned).
 void testInsertedBreakpoint()
          Tests that inserted breakpoints aren't visible in the fcore file.
 void testLinuxCoreFileMaps()
           
 void testLinuxCoreFileStackTrace()
          Test that a corefile backtrace and a live process backtrace match on a blocked process
 void testLinuxCoreHostPopulation()
           
 void testLinuxProcAuxV()
           
 void testLinuxProcPopulation()
           
 void testLinuxTaskMemory()
           
 void testLinuxTaskPopulation()
           
 void testRelativePath()
           
 
Methods inherited from class frysk.testbed.TestLib
addToTearDown, addToTearDown, assertRunToFindProc, assertRunUntilStop, assertRunUntilStop, getExecPath, isChildOf, isChildOfMine, isDescendantOf, isDescendantOfMine, runPending, setUp, tearDown
 
Methods inherited from class frysk.junit.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, getTimeoutMilliseconds, getTimeoutSeconds, missing32or64, unresolved, unresolvedOffUtrace, unresolvedOn32On64, unresolvedOnIA32, unresolvedOnPPC, unresolvedOnUtrace, unresolvedOnx8664, unsupported
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

coreProc

private Proc coreProc
Constructor Detail

TestLinuxCore

public TestLinuxCore()
Method Detail

testRelativePath

public void testRelativePath()

testLinuxCoreFileMaps

public void testLinuxCoreFileMaps()

findCoreMap

private int findCoreMap(long address,
                        MemoryMap[] maps)

testLinuxCoreFileStackTrace

public void testLinuxCoreFileStackTrace()
Test that a corefile backtrace and a live process backtrace match on a blocked process


testLinuxCoreHostPopulation

public void testLinuxCoreHostPopulation()

testLinuxProcPopulation

public void testLinuxProcPopulation()

testLinuxProcAuxV

public void testLinuxProcAuxV()

testLinuxTaskMemory

public void testLinuxTaskMemory()

testLinuxTaskPopulation

public void testLinuxTaskPopulation()

testInsertedBreakpoint

public void testInsertedBreakpoint()
                            throws Exception
Tests that inserted breakpoints aren't visible in the fcore file.

Throws:
Exception

getFunctionEntryAddress

private static long getFunctionEntryAddress(Proc proc,
                                            String func)
Returns the address of the requested function through query Dwfl of the main Task of the given Proc.


giveMeAProc

protected Proc giveMeAProc()
Generate a process suitable for attaching to (ie detached when returned). Stop the process, check that is is found in the frysk state machine, then return a proc oject corresponding to that process.

Returns:
- Proc - generated process.

constructCore

private String constructCore(Proc ackProc)
Given a Proc object, generate a core file from that given proc.

Parameters:
ackProc - - proc object to generate core from.
Returns:
- name of constructed core file.

actionCoreProc

private void actionCoreProc(Proc proc,
                            ProcBlockObserver action)
Apply a core-file to a proc-block-action.