frysk.testbed
Class ExecOffspring

java.lang.Object
  extended by frysk.testbed.Offspring
      extended by frysk.testbed.SynchronizedOffspring
          extended by frysk.testbed.ExecOffspring

public class ExecOffspring
extends SynchronizedOffspring

Create a process running funit-exec as described by ExecCommand. The funit-exec program is created in two steps; first the ExecCommand is created. and second the ExecOffspring running that command. This two step process makes it easier to construct a chain of funit-execs. For instance, to create an funit-exec proces will invoke funit-exec and then invoke /bin/echo, use: new ExecOffspring(new ExecCommnand(new ExecCommand(new String[] { "/bin/echo", "hi"}))). The program funit-exec, when sent a signal, will exec its arguments.


Field Summary
private static Log fine
           
 
Fields inherited from class frysk.testbed.SynchronizedOffspring
START_ACK
 
Constructor Summary
ExecOffspring()
          Invoke funit-exec in a way that allows it to repeatedly re-exec itself.
ExecOffspring(ExecCommand command)
          Invoke funit-exec as specified by COMMAND.
 
Method Summary
 void assertRunExec(String why)
          Request an exec and then wait for the new program to signal back that it is running.
 void assertRunThreadExec(String why)
          Request that a random non-main thread do an exec and then wait for the new program to signal back that it is running.
 void requestExec()
          Request that the process perform an exec.
 void requestThreadExec()
          Request that a random thread does an exec.
 
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

fine

private static final Log fine
Constructor Detail

ExecOffspring

public ExecOffspring(ExecCommand command)
Invoke funit-exec as specified by COMMAND.


ExecOffspring

public ExecOffspring()
Invoke funit-exec in a way that allows it to repeatedly re-exec itself.

Method Detail

requestExec

public void requestExec()
Request that the process perform an exec. Since the exec starts a new program, this operation is not acknowledged.


requestThreadExec

public void requestThreadExec()
Request that a random thread does an exec.


assertRunExec

public void assertRunExec(String why)
Request an exec and then wait for the new program to signal back that it is running. This assumes that the new program is set up to send the START_ACK to this process.


assertRunThreadExec

public void assertRunThreadExec(String why)
Request that a random non-main thread do an exec and then wait for the new program to signal back that it is running. This assumes that the new program is set up to send the START_ACK to this process.