frysk.isa.corefiles
Class TestLinuxElfCorefile

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.isa.corefiles.TestLinuxElfCorefile
All Implemented Interfaces:
Test

public class TestLinuxElfCorefile
extends TestLib


Field Summary
 
Fields inherited from class frysk.testbed.TestLib
host
 
Constructor Summary
TestLinuxElfCorefile()
           
 
Method Summary
private  String constructCore(Proc ackProc)
          Given a Proc object, generate a core file from that given proc.
private  int findLowAddress(long address, MemoryMap[] maps)
           
private  Elf getElf(String coreFileName)
           
private  ISA getISA(Proc proc)
          Returns the ISA that corresponds to the given Proc
private  Proc giveMeABlockedProc()
           
private  Proc giveMeAProc()
          Generate a process suitable for attaching to (ie detached when returned).
 void testAuxv()
           
 void testCoreFileCreated()
           
 void testElfCoreHeader()
           
 void testProgramSegmentHeader()
           
 void testRegexSelectedMap()
           
 
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
 

Constructor Detail

TestLinuxElfCorefile

public TestLinuxElfCorefile()
Method Detail

testCoreFileCreated

public void testCoreFileCreated()

testElfCoreHeader

public void testElfCoreHeader()

testProgramSegmentHeader

public void testProgramSegmentHeader()

testAuxv

public void testAuxv()

testRegexSelectedMap

public void testRegexSelectedMap()

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.

giveMeAProc

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

giveMeABlockedProc

private Proc giveMeABlockedProc()

getISA

private ISA getISA(Proc proc)
Returns the ISA that corresponds to the given Proc

Parameters:
Proc - - the proc to test
Returns:
Isa - the Isa that corresponds to given proc.

getElf

private Elf getElf(String coreFileName)

findLowAddress

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