#include "testing_api_barrier.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTING_PluginFunctions |
The plugin API every test case plugin has to implement. More... | |
Typedefs | |
typedef void(* | GNUNET_TESTING_cmd_helper_write_cb) (const struct GNUNET_MessageHeader *message) |
Callback function to write messages from the helper process running on a netjail node to the master process. More... | |
Definition in file testing_api_loop.h.
typedef void(* GNUNET_TESTING_cmd_helper_write_cb) (const struct GNUNET_MessageHeader *message) |
Callback function to write messages from the helper process running on a netjail node to the master process.
message | The message to write. |
Definition at line 37 of file testing_api_loop.h.
void GNUNET_TESTING_loop_notify_parent_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
const struct GNUNET_MessageHeader * | hdr | ||
) |
Send message to our parent.
Fails very hard if we do not have one.
is | The interpreter loop. |
Definition at line 265 of file testing_api_loop.c.
References GNUNET_TESTING_FAIL, is, and GNUNET_TESTING_Interpreter::parent_writer.
Referenced by barrier_reached_run(), and handle_helper_barrier_reached().
void GNUNET_TESTING_loop_notify_children_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
const struct GNUNET_MessageHeader * | hdr | ||
) |
Send message to all netjail children (if there are any).
is | The interpreter loop. |
Definition at line 239 of file testing_api_loop.c.
References GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELPER_send(), GNUNET_log, GNUNET_new, GNUNET_TESTING_Interpreter::helpers, is, SendContext::is, GNUNET_TESTING_Interpreter::n_helpers, send_finished(), SendContext::send_handle, GNUNET_TESTING_Interpreter::sender_head, GNUNET_TESTING_Interpreter::sender_tail, and GNUNET_MessageHeader::type.
Referenced by barrier_reached_run(), handle_helper_barrier_crossable(), and handle_helper_barrier_reached().
void GNUNET_TESTING_interpreter_next_ | ( | void * | cls | ) |
Current command is done, run the next one.
Definition at line 351 of file testing_api_loop.c.
References GNUNET_TESTING_Command::cls, GNUNET_TESTING_Interpreter::commands, GNUNET_TESTING_Command::finish_time, GNUNET_ERROR_TYPE_MESSAGE, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_TESTING_cmd_batch_next_(), GNUNET_TESTING_cmd_is_batch_(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_duration(), interpreter_run(), GNUNET_TESTING_Interpreter::ip, is, GNUNET_TESTING_Interpreter::result, and GNUNET_TESTING_Interpreter::task.
Referenced by batch_run(), GNUNET_TESTING_async_finish(), and GNUNET_TESTING_interpreter_run_cmd_().
void GNUNET_TESTING_interpreter_run_cmd_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
struct GNUNET_TESTING_Command * | cmd | ||
) |
Definition at line 393 of file testing_api_loop.c.
References GNUNET_TESTING_Command::ac, GNUNET_TESTING_Command::asynchronous_finish, GNUNET_TESTING_Command::cls, GNUNET_TESTING_AsyncContext::finished, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_CRYPTO_hash(), GNUNET_NO, GNUNET_TESTING_cmd_is_batch_(), GNUNET_TESTING_interpreter_next_(), GNUNET_TIME_absolute_get(), GNUNET_TESTING_AsyncContext::is, is, GNUNET_TESTING_Command::last_req_time, GNUNET_TESTING_Command::name, GNUNET_TESTING_AsyncContext::next_called, GNUNET_TESTING_Command::num_tries, GNUNET_TESTING_Command::run, GNUNET_TESTING_Command::start_time, and GNUNET_TESTING_Interpreter::vars.
Referenced by batch_run(), and interpreter_run().
void GNUNET_TESTING_add_netjail_helper_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
struct GNUNET_HELPER_Handle * | helper | ||
) |
Adding a helper handle to the interpreter.
is | The interpreter. |
helper | The helper handle. |
Definition at line 701 of file testing_api_loop.c.
References GNUNET_array_append, GNUNET_TESTING_Interpreter::helpers, is, and GNUNET_TESTING_Interpreter::n_helpers.
Referenced by start_helper().
void GNUNET_TESTING_add_barrier_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
struct GNUNET_TESTING_Barrier * | barrier | ||
) |
Add a barrier to the interpreter to share it with all children as an inherited barrier.
is | The interpreter. |
barrier | The barrier to add. |
Definition at line 735 of file testing_api_loop.c.
References GNUNET_TESTING_Barrier::barrier_id, GNUNET_TESTING_Interpreter::barriers, GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_CONTAINER_multishortmap_create(), GNUNET_CONTAINER_multishortmap_put(), and is.
Referenced by barrier_run().
struct GNUNET_TESTING_Barrier * GNUNET_TESTING_get_barrier2_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
const struct GNUNET_ShortHashCode * | create_key | ||
) |
Definition at line 711 of file testing_api_loop.c.
References GNUNET_TESTING_Interpreter::barriers, GNUNET_CONTAINER_multishortmap_get(), and is.
Referenced by GNUNET_TESTING_get_barrier_(), handle_helper_barrier_crossable(), and handle_helper_barrier_reached().
struct GNUNET_TESTING_Barrier * GNUNET_TESTING_get_barrier_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
const char * | barrier_name | ||
) |
Definition at line 720 of file testing_api_loop.c.
References GNUNET_TESTING_Interpreter::barriers, GNUNET_TESTING_barrier_name_hash_(), GNUNET_TESTING_get_barrier2_(), and is.
Referenced by barrier_reached_run().
unsigned int GNUNET_TESTING_barrier_count_ | ( | struct GNUNET_TESTING_Interpreter * | is | ) |
Definition at line 753 of file testing_api_loop.c.
References GNUNET_TESTING_Interpreter::barriers, GNUNET_CONTAINER_multishortmap_size(), and is.
Referenced by send_start_messages().
void GNUNET_TESTING_barrier_iterate_ | ( | struct GNUNET_TESTING_Interpreter * | is, |
GNUNET_CONTAINER_ShortmapIterator | cb, | ||
void * | cb_cls | ||
) |
Definition at line 761 of file testing_api_loop.c.
References GNUNET_TESTING_Interpreter::barriers, GNUNET_CONTAINER_multishortmap_iterate(), and is.
Referenced by send_start_messages().