51 memset (&
key, 0,
sizeof(
key));
75 "Testing library failed to create a room state with key '%s'\n",
90 unsigned int door_index = stage->
door_id;
105 "Testing library failed to get peer identity of index '%u'\n",
120 "Testing library failed to open room with key '%s'\n",
134 "Testing library failed to enter room with key '%s'\n",
167 const char *service_label,
static struct GNUNET_TESTING_Interpreter * is
struct GNUNET_HashCode key
The key used in the DHT.
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
#define GNUNET_TESTING_command_new(cls, label, run, cleanup, traits)
Create a new command.
void GNUNET_TESTING_interpreter_fail(struct GNUNET_TESTING_Interpreter *is)
Current command failed, clean up and fail the test case.
struct GNUNET_PeerIdentity * GNUNET_TESTING_get_peer(unsigned int num, const struct GNUNET_TESTING_System *tl_system)
Retrieve peer identity from the test system with the unique node id.
uint32_t GNUNET_CRYPTO_random_u32(enum GNUNET_CRYPTO_Quality mode, uint32_t i)
Produce a random value.
@ GNUNET_CRYPTO_QUALITY_WEAK
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
void * GNUNET_CONTAINER_multihashmap_get(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Given a key find a value in the map matching the key.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE...
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_ERROR
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_MESSENGER_Room * GNUNET_MESSENGER_open_room(struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_HashCode *key)
Open a room to send and receive messages.
struct GNUNET_MESSENGER_Room * GNUNET_MESSENGER_enter_room(struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key)
Enter a room to send and receive messages through a door opened using GNUNET_MESSENGER_open_room.
testing lib for messenger service
enum GNUNET_GenericReturnValue GNUNET_MESSENGER_get_trait_state(const struct GNUNET_TESTING_Command *cmd, struct GNUNET_MESSENGER_StartServiceState **ret)
struct GNUNET_MESSENGER_Room * room
struct GNUNET_MESSENGER_Handle * msg
struct GNUNET_MESSENGER_TestStageTopology * topology
struct GNUNET_CONTAINER_MultiHashMap * rooms
const struct GNUNET_TESTING_System * tl_system
struct GNUNET_MESSENGER_TestStage * peer_stages
enum GNUNET_MESSENGER_TestStageJoin join
The identity of the host (wraps the signing key of the peer).
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.
Global state of the interpreter, used by a command to access information about other commands.
struct GNUNET_MESSENGER_RoomState * GNUNET_MESSENGER_create_room_state(struct GNUNET_MESSENGER_TestStageTopology *topology)
@ GNUNET_MESSENGER_STAGE_JOIN_ENTER_ROOM
@ GNUNET_MESSENGER_STAGE_JOIN_OPEN_ROOM
static void join_room_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
static void join_room_cleanup(void *cls)
struct GNUNET_TESTING_Command GNUNET_MESSENGER_cmd_join_room(const char *label, const char *service_label, const char *room_key)