frysk.proc.live
Class TestTaskObserverCode

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.live.TestTaskObserverCode
All Implemented Interfaces:
Test

public class TestTaskObserverCode
extends TestLib


Nested Class Summary
(package private) static class TestTaskObserverCode.AttachedObserver
           
(package private) static class TestTaskObserverCode.CodeObserver
           
(package private) static class TestTaskObserverCode.CountingCodeObserver
           
(package private) static class TestTaskObserverCode.RemovingCodeObserver
           
private static class TestTaskObserverCode.SignaledObserver
           
(package private) static class TestTaskObserverCode.Symbol
           
private  class TestTaskObserverCode.TerminatingObserver
           
 
Field Summary
private  Offspring child
           
private static Signal dummySig
           
private  Proc proc
           
private  Task task
           
 
Fields inherited from class frysk.testbed.TestLib
host
 
Constructor Summary
TestTaskObserverCode()
           
 
Method Summary
private  void breakTest(int argc)
           
(package private)  DwarfDie getFunctionDie(String func)
           
(package private)  long getFunctionEntryAddress(String func)
          Returns the address of the requested function through query the Proc Elf and DwarfDie.
(package private)  long getGlobalLabelAddress(String label)
          Returns the address of a global label by quering the the Proc main Task's Dwlf.
(package private)  void requestDummyRun()
          Request that that the child runs its dummy function which will call the pb1 and pb1 functions.
(package private)  void requestDummyRun(int id)
          Request that that given thread of the child runs its dummy function which will call the pb1 and pb1 functions.
(package private)  void requestDummyRun(Task t)
           
 void testBreakDivZero()
           
 void testBreakIllegalAddress()
           
 void testBreakIllegalInstruction()
           
 void testBreakSignalIgnore()
           
 void testBreakSignalTerminate()
           
 void testCode()
           
 void testCodeOverFork()
           
 void testCodeRemovedInHit()
           
 void testCodeSignalInterrupt()
           
 void testInstallCodeDuringCode()
           
 void testMultiTaskUpdate()
           
 void testMultiTaskUpdateCalledSeveralTimes()
           
 void testMultiTaskUpdateUnblockDelete()
           
 void testViewBreakpointMap()
           
 void testViewBreakpointMemory()
           
 
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

child

private Offspring child

task

private Task task

proc

private Proc proc

dummySig

private static final Signal dummySig
Constructor Detail

TestTaskObserverCode

public TestTaskObserverCode()
Method Detail

testCode

public void testCode()
              throws Exception
Throws:
Exception

testCodeSignalInterrupt

public void testCodeSignalInterrupt()
                             throws Exception
Throws:
Exception

testInstallCodeDuringCode

public void testInstallCodeDuringCode()
                               throws Exception
Throws:
Exception

testCodeRemovedInHit

public void testCodeRemovedInHit()
                          throws Exception
Throws:
Exception

getGlobalLabelAddress

long getGlobalLabelAddress(String label)
Returns the address of a global label by quering the the Proc main Task's Dwlf.


breakTest

private void breakTest(int argc)

testBreakDivZero

public void testBreakDivZero()

testBreakIllegalAddress

public void testBreakIllegalAddress()

testBreakIllegalInstruction

public void testBreakIllegalInstruction()

testBreakSignalTerminate

public void testBreakSignalTerminate()

testBreakSignalIgnore

public void testBreakSignalIgnore()

testViewBreakpointMemory

public void testViewBreakpointMemory()
                              throws Exception
Throws:
Exception

testViewBreakpointMap

public void testViewBreakpointMap()
                           throws Exception
Throws:
Exception

testMultiTaskUpdate

public void testMultiTaskUpdate()
                         throws Exception
Throws:
Exception

testMultiTaskUpdateCalledSeveralTimes

public void testMultiTaskUpdateCalledSeveralTimes()
                                           throws Exception
Throws:
Exception

testMultiTaskUpdateUnblockDelete

public void testMultiTaskUpdateUnblockDelete()
                                      throws Exception
Throws:
Exception

testCodeOverFork

public void testCodeOverFork()
                      throws Exception
Throws:
Exception

requestDummyRun

void requestDummyRun()
               throws Errno
Request that that the child runs its dummy function which will call the pb1 and pb1 functions. Done by sending it the dummySig. To observe this event one needs to put a code observer on the dummy (), bp1_func () and/or bp2_func () functions.

Throws:
Errno

requestDummyRun

void requestDummyRun(Task t)

requestDummyRun

void requestDummyRun(int id)
Request that that given thread of the child runs its dummy function which will call the pb1 and pb1 functions. Done by sending it the dummySig. To observe this event one needs to put a code observer on the dummy (), pb1_func () and/or pb2_func () functions.


getFunctionEntryAddress

long getFunctionEntryAddress(String func)
                       throws ElfException
Returns the address of the requested function through query the Proc Elf and DwarfDie. Asserts that the function has only 1 entry point.

Throws:
ElfException

getFunctionDie

DwarfDie getFunctionDie(String func)
                  throws ElfException
Throws:
ElfException