|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.testbed.Offspring frysk.testbed.SynchronizedOffspring frysk.testbed.SlaveOffspring
public class SlaveOffspring
Create a process running the funit slave (a.k.a., funit-child). The slave can be manipulated using various signals and methods listed below.
Field Summary | |
---|---|
private static Signal |
ADD_CLONE_SIG
|
private static Signal |
ADD_FORK_SIG
|
static Signal |
CHILD_ACK
|
private static Signal |
DEL_CLONE_SIG
|
private static Signal |
DEL_FORK_SIG
|
private static Signal[] |
EXEC_ACK
|
private static Signal |
EXEC_CLONE_SIG
|
private static Signal |
EXEC_SIG
|
static Signal |
PARENT_ACK
|
private static Signal[] |
SPAWN_ACK
|
private static Signal |
ZOMBIE_FORK_SIG
|
Fields inherited from class frysk.testbed.SynchronizedOffspring |
---|
START_ACK |
Constructor Summary | |
---|---|
private |
SlaveOffspring(OffspringType type)
Create an ack process. |
private |
SlaveOffspring(OffspringType type,
boolean busy)
Create an SlaveOffspring; if BUSY, the process will use a busy-loop, instead of suspending, when waiting for signal commands. |
private |
SlaveOffspring(OffspringType type,
String[] args)
Create an ack process with args. |
Method Summary | |
---|---|
SlaveOffspring |
assertSendAddClonesWaitForAcks(int count)
Add many Tasks; wait for acknowledgement. |
void |
assertSendAddCloneWaitForAcks()
Add a Task; wait for acknowledgement. |
void |
assertSendAddForkWaitForAcks()
Add a child Proc; wait for acknowledgement |
void |
assertSendDelCloneWaitForAcks()
Delete a Task. |
void |
assertSendDelForkWaitForAcks()
Delete a child Proc. |
void |
assertSendExecCloneWaitForAcks()
Request that the cloned task perform an exec. |
void |
assertSendExecWaitForAcks()
Request that the main task perform an exec; wait for the acknowledge. |
void |
assertSendFryParentWaitForAcks()
Kill the parent, expect an ack from the child (there had better be a child). |
void |
assertSendZombieForkWaitForAcks()
Terminate a fork Proc (creates zombie). |
static SlaveOffspring |
createAttachedChild()
Create an attached slave-process that is a child of this process. |
static SlaveOffspring |
createChild()
Create a slave-process that is a child of this process. |
static SlaveOffspring |
createDaemon()
Create a slave-process that is a child of this process. |
static SlaveOffspring |
createDaemon(boolean busy)
Create a slave-process that is a child of this process. |
static SlaveOffspring |
createDaemon(String[] args)
Create a slave-process that is a child of this process with args. |
private static String[] |
funitSlaveCommand(boolean busy,
String[] argv)
Build the slave command that should be run. |
static File |
getExecutable()
Return the program executable that will be run. |
void |
reap()
Reap the process.. |
Signal[] |
requestClone()
Request that a task be added. |
Signal[] |
requestExec()
Request that the main task perform an exec. |
Signal[] |
requestFork()
Request that a child Proc be added. |
private void |
spawn(ProcessIdentifier tid,
Signal sig,
String why)
Tell TID to create a new offspring. |
Methods inherited from class frysk.testbed.SynchronizedOffspring |
---|
getPid |
Methods inherited from class frysk.testbed.Offspring |
---|
assertIs, assertRunToFindProc, assertRunUntil, assertSendStop, findTaskUsingRefresh, kill, signal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Signal CHILD_ACK
public static final Signal PARENT_ACK
private static final Signal[] SPAWN_ACK
private static final Signal[] EXEC_ACK
private static final Signal ADD_CLONE_SIG
private static final Signal DEL_CLONE_SIG
private static final Signal ADD_FORK_SIG
private static final Signal DEL_FORK_SIG
private static final Signal ZOMBIE_FORK_SIG
private static final Signal EXEC_SIG
private static final Signal EXEC_CLONE_SIG
Constructor Detail |
---|
private SlaveOffspring(OffspringType type)
private SlaveOffspring(OffspringType type, String[] args)
private SlaveOffspring(OffspringType type, boolean busy)
Method Detail |
---|
private static String[] funitSlaveCommand(boolean busy, String[] argv)
private void spawn(ProcessIdentifier tid, Signal sig, String why)
public void assertSendAddCloneWaitForAcks()
public Signal[] requestClone()
public SlaveOffspring assertSendAddClonesWaitForAcks(int count)
public void assertSendDelCloneWaitForAcks()
public void assertSendAddForkWaitForAcks()
public Signal[] requestFork()
public void assertSendDelForkWaitForAcks()
public void assertSendZombieForkWaitForAcks()
public void assertSendFryParentWaitForAcks()
public void assertSendExecWaitForAcks()
public Signal[] requestExec()
public void assertSendExecCloneWaitForAcks()
public void reap()
public static SlaveOffspring createChild()
public static SlaveOffspring createDaemon()
public static SlaveOffspring createDaemon(String[] args)
public static SlaveOffspring createDaemon(boolean busy)
public static SlaveOffspring createAttachedChild()
public static File getExecutable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |