cmd to block the interpreter loop until all peers started. More...
Go to the source code of this file.
Data Structures | |
struct | BashScriptState |
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Functions | |
static void | exec_bash_script_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static void | child_completed_callback (void *cls, enum GNUNET_OS_ProcessStatusType type, long unsigned int exit_code) |
Callback which will be called if the setup script finished. More... | |
static void | exec_bash_script_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
Run method of the command created by the interpreter to wait for another command to finish. More... | |
static enum GNUNET_GenericReturnValue | traits (void *cls, const void **ret, const char *trait, unsigned int index) |
This function prepares an array with traits. More... | |
const struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_exec (const char *label, enum GNUNET_OS_ProcessStatusType expected_type, unsigned long int expected_exit_code, char *const script_argv[]) |
Command to execute a command. More... | |
const struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_exec_va (const char *label, enum GNUNET_OS_ProcessStatusType expected_type, unsigned long int expected_exit_code,...) |
Command to execute a command. More... | |
cmd to block the interpreter loop until all peers started.
Definition in file testing_api_cmd_exec.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Definition at line 30 of file testing_api_cmd_exec.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 77 of file testing_api_cmd_exec.c.
References BashScriptState::args, BashScriptState::cwh, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_process_kill(), GNUNET_OS_process_wait(), GNUNET_wait_child_cancel(), and BashScriptState::start_proc.
Referenced by GNUNET_TESTING_cmd_exec(), and GNUNET_TESTING_cmd_exec_va().
|
static |
Callback which will be called if the setup script finished.
Definition at line 112 of file testing_api_cmd_exec.c.
References BashScriptState::ac, BashScriptState::cwh, exit_code, BashScriptState::expected_exit_code, BashScriptState::expected_type, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OS_process_destroy(), GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), BashScriptState::start_proc, and type.
Referenced by exec_bash_script_run().
|
static |
Run method of the command created by the interpreter to wait for another command to finish.
Definition at line 143 of file testing_api_cmd_exec.c.
References BashScriptState::args, child_completed_callback(), BashScriptState::cwh, GNUNET_assert, GNUNET_break, GNUNET_OS_INHERIT_STD_ERR, GNUNET_OS_start_process_vap(), GNUNET_wait_child(), and BashScriptState::start_proc.
Referenced by GNUNET_TESTING_cmd_exec(), and GNUNET_TESTING_cmd_exec_va().
|
static |
This function prepares an array with traits.
Definition at line 168 of file testing_api_cmd_exec.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_make_trait_process(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, BashScriptState::start_proc, and traits().
Referenced by barrier_reached_traits(), barrier_traits(), batch_traits(), connect_peers_traits(), GNUNET_TESTING_cmd_exec(), GNUNET_TESTING_cmd_exec_va(), GNUNET_TESTING_command_new_ac(), GNUNET_TESTING_get_trait(), netjail_exec_traits(), start_peer_traits(), start_service_traits(), stop_peer_traits(), system_create_traits(), and traits().
const struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_exec | ( | const char * | label, |
enum GNUNET_OS_ProcessStatusType | expected_type, | ||
unsigned long int | expected_exit_code, | ||
char *const | script_argv[] | ||
) |
Command to execute a command.
label | Label of the command. |
Definition at line 187 of file testing_api_cmd_exec.c.
References BashScriptState::ac, BashScriptState::args, exec_bash_script_cleanup(), exec_bash_script_run(), BashScriptState::expected_exit_code, BashScriptState::expected_type, GNUNET_new, GNUNET_new_array, GNUNET_strdup, GNUNET_TESTING_command_new_ac(), and traits().
const struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_exec_va | ( | const char * | label, |
enum GNUNET_OS_ProcessStatusType | expected_type, | ||
unsigned long int | expected_exit_code, | ||
... | |||
) |
Command to execute a command.
label | Label of the command. |
Definition at line 217 of file testing_api_cmd_exec.c.
References BashScriptState::ac, find_typedefs::arg, BashScriptState::args, exec_bash_script_cleanup(), exec_bash_script_run(), BashScriptState::expected_exit_code, BashScriptState::expected_type, GNUNET_new, GNUNET_new_array, GNUNET_strdup, GNUNET_TESTING_command_new_ac(), and traits().