Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Functions
ipc_test.cpp File Reference
#include <interfaces/init.h>
#include <ipc/capnp/protocol.h>
#include <ipc/process.h>
#include <ipc/protocol.h>
#include <logging.h>
#include <mp/proxy-types.h>
#include <test/ipc_test.capnp.h>
#include <test/ipc_test.capnp.proxy.h>
#include <test/ipc_test.h>
#include <tinyformat.h>
#include <validation.h>
#include <future>
#include <thread>
#include <kj/common.h>
#include <kj/memory.h>
#include <kj/test.h>
#include <stdexcept>
#include <boost/test/unit_test.hpp>
Include dependency graph for ipc_test.cpp:

Go to the source code of this file.

Classes

class  TestInit
 Remote init class. More...
 

Functions

static std::string TempPath (std::string_view pattern)
 Generate a temporary path with temp_directory_path and mkstemp. More...
 
void IpcPipeTest ()
 Unit test that tests execution of IPC calls without actually creating a separate process. More...
 
void IpcSocketPairTest ()
 Test ipc::Protocol connect() and serve() methods connecting over a socketpair. More...
 
void IpcSocketTest (const fs::path &datadir)
 Test ipc::Process bind() and connect() methods connecting over a unix socket. More...
 

Function Documentation

◆ IpcPipeTest()

void IpcPipeTest ( )

Unit test that tests execution of IPC calls without actually creating a separate process.

This test is primarily intended to verify behavior of type conversion code that converts C++ objects to Cap'n Proto messages and vice versa.

The test creates a thread which creates a FooImplementation object (defined in ipc_test.h) and a two-way pipe accepting IPC requests which call methods on the object through FooInterface (defined in ipc_test.capnp).

Definition at line 54 of file ipc_test.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IpcSocketPairTest()

void IpcSocketPairTest ( )

Test ipc::Protocol connect() and serve() methods connecting over a socketpair.

Definition at line 130 of file ipc_test.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IpcSocketTest()

void IpcSocketTest ( const fs::path datadir)

Test ipc::Process bind() and connect() methods connecting over a unix socket.

Definition at line 150 of file ipc_test.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TempPath()

static std::string TempPath ( std::string_view  pattern)
static

Generate a temporary path with temp_directory_path and mkstemp.

Definition at line 34 of file ipc_test.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: