frysk.proc
Class StressAttachDetachSignaledTask

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

public class StressAttachDetachSignaledTask
extends TestLib

Test attaching to a process with many many tasks. When a the kernel is sent both a request to attach to a task and, moments later, a signal, the attach may either find the task stopped, or stopped-with-signal. Since this isn't really deterministic, exercise the edge case via a stress test.


Nested Class Summary
(package private)  class StressAttachDetachSignaledTask.AttachDetach
          An agressive observer that spends its life adding and removing itself.
private static class StressAttachDetachSignaledTask.SignalStorm
          A signal class; that just adds then delets itself.
(package private)  class StressAttachDetachSignaledTask.Spawn
          Stress test attaching and detaching a process that is constantly receiving signals.
 
Field Summary
 
Fields inherited from class frysk.testbed.TestLib
host
 
Constructor Summary
StressAttachDetachSignaledTask()
           
 
Method Summary
private  void stressSignalStorm(Action action)
           
 void testBlockedSignalStorm()
          Stress attaching and detaching a task that is constantly signalling itself.
 void testCloning()
          Stress attaching and detaching a task that is constantly receiving signals, and simultaneously creating and deleting new tasks.
 void testExecing()
          Stress attaching and detaching a task that is constantly receiving signals, and simultaneously doing execs.
 void testForking()
          Stress attaching and detaching a task that is constantly receiving signals, and simultaneously creating and deleting child processes.
 void testUnblockedSignalStorm()
          Stress attaching and detaching a task that is constantly signalling itself.
 
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

StressAttachDetachSignaledTask

public StressAttachDetachSignaledTask()
Method Detail

testForking

public void testForking()
Stress attaching and detaching a task that is constantly receiving signals, and simultaneously creating and deleting child processes.


testCloning

public void testCloning()
Stress attaching and detaching a task that is constantly receiving signals, and simultaneously creating and deleting new tasks.


testExecing

public void testExecing()
Stress attaching and detaching a task that is constantly receiving signals, and simultaneously doing execs.


stressSignalStorm

private void stressSignalStorm(Action action)

testBlockedSignalStorm

public void testBlockedSignalStorm()
Stress attaching and detaching a task that is constantly signalling itself. If a signal is lost, the child process will abort.


testUnblockedSignalStorm

public void testUnblockedSignalStorm()
Stress attaching and detaching a task that is constantly signalling itself. If a signal is lost, the child process will abort.