Crashpad
|
Manages a multiprocess test on Windows. More...
#include "test/win/win_multiprocess.h"
Static Public Member Functions | |
template<class T > | |
static void | Run () |
Runs the test. More... | |
Protected Member Functions | |
void | SetExpectedChildExitCode (unsigned int exit_code) |
Sets the expected exit code of the child process. More... | |
FileHandle | ReadPipeHandle () const |
Returns the read pipe's file handle. More... | |
FileHandle | WritePipeHandle () const |
Returns the write pipe's file handle. More... | |
void | CloseReadPipe () |
Closes the read pipe. More... | |
void | CloseWritePipe () |
Closes the write pipe. More... | |
HANDLE | ChildProcess () const |
Returns a handle to the child process. More... | |
Manages a multiprocess test on Windows.
|
protected |
Returns a handle to the child process.
This method may only be called by the parent process.
|
protected |
Closes the read pipe.
This method may be called by either the parent or the child process. ReadPipeHandle() must not be called after this.
|
protected |
Closes the write pipe.
This method may be called by either the parent or the child process. An attempt to read from the read pipe in the partner process will indicate end-of-file. WritePipeHandle() must not be called after this.
|
protected |
Returns the read pipe's file handle.
This method may be called by either the parent or the child process. Anything written to the write pipe in the partner process will appear on this file handle in this process.
It is an error to call this after CloseReadPipe() has been called.
|
inlinestatic |
Runs the test.
This method establishes the testing environment by respawning the process as a child with additional flags.
In the parent process, WinMultiprocessParent() is run, and in the child WinMultiprocessChild().
|
protected |
Sets the expected exit code of the child process.
The default expected termination code is EXIT_SUCCESS
(0
).
[in] | exit_code | The expected exit status of the child. |
|
protected |
Returns the write pipe's file handle.
This method may be called by either the parent or the child process. Anything written to this file handle in this process will appear on the read pipe in the partner process.
It is an error to call this after CloseWritePipe() has been called.