frysk.stack
Class TestSignalStepFrame
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
frysk.junit.TestCase
frysk.testbed.TestLib
frysk.stack.TestSignalStepFrame
- All Implemented Interfaces:
- Observer, TaskObserver, TaskObserver.Code, TaskObserver.Instruction, TaskObserver.Signaled, Test
public class TestSignalStepFrame
- extends TestLib
- implements TaskObserver.Code, TaskObserver.Instruction, TaskObserver.Signaled
Test making sure all frames are available when stepping through a
signal call. It checks on each step that both the interruped
function and the main function are outer frames (in that order) of
the inner frame (which is the signal processing function of the
task).
Note this checks the low level (libunwind) frames walking. It
doesn't test anything at a higher level or with the SteppingEngine.
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.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 |
TestSignalStepFrame
public TestSignalStepFrame()
setupLoopSignalTest
private Task setupLoopSignalTest()
testFirstFrameInSignalHandler
public void testFirstFrameInSignalHandler()
testReturnFrameAfterSignalHandler
public void testReturnFrameAfterSignalHandler()
testStepSignalCallAllFrames
public void testStepSignalCallAllFrames()
assertFooAndMainOuterFrames
private void assertFooAndMainOuterFrames(String message,
Frame frame)
printBacktrace
private void printBacktrace(Frame frame)
updateHit
public Action updateHit(Task task,
long address)
- Description copied from interface:
TaskObserver.Code
- The task has hit the breakpoint. Return Action.BLOCK to
block the task's further execution. Note that all Tasks of
a Proc share their breakpoints, so this method needs to
check the actual Task that got hit.
- Specified by:
updateHit
in interface TaskObserver.Code
updateExecuted
public Action updateExecuted(Task task)
- Description copied from interface:
TaskObserver.Instruction
- The task has started executing or has executed another
instruction. Return Action.BLOCK to block the task's
further execution. When Action.CONTINUE is returned
this method will be called as soon as one instruction
has been executed.
- Specified by:
updateExecuted
in interface TaskObserver.Instruction
updateSignaled
public Action updateSignaled(Task task,
Signal signal)
- Description copied from interface:
TaskObserver.Signaled
- The SIGNAL is pending delivery to the task. Return
Action.BLOCK to block the task's further execution.
XXX: This gets weird. At present and in theory, a client
wanting to discard a signal would need to sequence the
following: tell the task to scrub discard the signal; tell
the task to remove this observer from the set of blockers;
return Action.BLOCK so that this task is added to the set
of blockers. Perhaps it would be better to always add an
observer to the blocker pool and then require explict
removal.
- Specified by:
updateSignaled
in interface TaskObserver.Signaled
addFailed
public void addFailed(Object observable,
Throwable w)
- Description copied from interface:
Observer
- Notify that the attempt to add to the specified observer failed.
- Specified by:
addFailed
in interface Observer
addedTo
public void addedTo(Object observable)
- Description copied from interface:
Observer
- Acknowledge the request to add this Observer from Object's set
of observers was successful.
- Specified by:
addedTo
in interface Observer
deletedFrom
public void deletedFrom(Object observable)
- Description copied from interface:
Observer
- Acknowledge the request to delete this Observer from Object's
set of observers was successful (or that the Observer was
spontaneously deleted, e.g., due to a task exit).
- Specified by:
deletedFrom
in interface Observer