Go to the source code of this file.
◆ GNUNET_TESTING_TESTBED_SIMPLE_TRAITS
◆ GNUNET_TESTBED_cmd_system_destroy()
struct GNUNET_TESTING_Command GNUNET_TESTBED_cmd_system_destroy |
( |
const char * |
label, |
|
|
const char * |
create_label |
|
) |
| |
This command destroys the resources allocated for the test system setup.
- Parameters
-
label | Name for command. |
create_label | Label of the cmd which started the test system. |
write_message | Callback to write messages to the master loop. |
- Returns
- command.
◆ GNUNET_TESTBED_cmd_system_create()
struct GNUNET_TESTING_Command GNUNET_TESTBED_cmd_system_create |
( |
const char * |
label, |
|
|
const char * |
my_node_id |
|
) |
| |
This command is setting up a test environment for a peer to start.
- Parameters
-
label | Name for command. |
my_node_id | The specific id of the node this command is running on. A sub string of the id is the process id of the master process. This id is used to build the name of the temporary directory of the peer to start. |
Definition at line 111 of file testbed_api_cmd_system_create.c.
113{
115
118 "%s%s",
121
123 label,
127}
static const char * my_node_id
#define GNUNET_TESTING_command_new(cls, label, run, cleanup, traits)
Create a new command.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
Struct to hold information for callbacks.
static void system_create_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
The run method of this cmd will setup a test environment for a node.
static int system_create_traits(void *cls, const void **ret, const char *trait, unsigned int index)
This function prepares an array with traits.
static void system_create_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
References BASE_DIR, GNUNET_asprintf(), GNUNET_new, GNUNET_TESTING_command_new, my_node_id, system_create_cleanup(), system_create_run(), system_create_traits(), and TestSystemState::testdir.
◆ GNUNET_TESTING_TESTBED_get_trait_test_system()
◆ GNUNET_TESTING_TESTBED_make_trait_test_system()