static void
end ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending tests.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Ending tests.\n", test);
if (end_badly_task != NULL)
{
{
struct TransmitClosure *tmit = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmission resumed.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Transmission resumed.\n", test);
if (NULL != tmit->host_ann)
GNUNET_SOCIAL_host_announce_resume (tmit->host_ann);
else
}
uint16_t size = strlen (tmit->data[tmit->n]);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmit notify data: %u bytes available, "
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Transmit notify data: %u bytes available, "
"processing fragment %u/%u (size %u).\n",
- *data_size, tmit->n + 1, tmit->data_count, size);
+ test, *data_size, tmit->n + 1, tmit->data_count, size);
if (*data_size < size)
{
*data_size = 0;
if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n])
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission paused.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Transmission paused.\n", test);
tmit->paused = GNUNET_YES;
GNUNET_SCHEDULER_add_delayed (
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
static void
host_left ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "The host has left the place.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: The host has left the place.\n", test);
end ();
}
{
place_pub_key = *home_pub_key;
GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host reconnected to place %s\n",
test, GNUNET_h2s (&place_pub_hash));
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
uint64_t max_message_id)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest reconnected to place: %d\n",
test, result);
GNUNET_assert (0 <= result);
static void
app_connected (void *cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "App connected: %p\n", cls);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: App connected: %p\n", test, cls);
if (NULL != core)
{
GNUNET_CORE_disconnecT (core);
struct GNUNET_HashCode host_pub_hash;
GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got app host place notification: %s\n",
- GNUNET_h2s (&host_pub_hash));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Got app host place notification: %s\n",
+ test, GNUNET_h2s (&host_pub_hash));
if (test == TEST_RECONNECT)
{
if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key)))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Reconnecting to host place: %s\n",
+ test, GNUNET_h2s (&host_pub_hash));
hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected,
host_answer_door, host_farewell2, NULL);
}
struct GNUNET_HashCode guest_pub_hash;
GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got app guest place notification: %s\n",
- GNUNET_h2s (&guest_pub_hash));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Got app guest place notification: %s\n",
+ test, GNUNET_h2s (&guest_pub_hash));
if (test == TEST_RECONNECT)
{
if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key)))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Reconnecting to guest place: %s\n",
+ test, GNUNET_h2s (&guest_pub_hash));
gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE,
guest_slicer, guest_reconnected, NULL);
}
const char *name)
{
char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Got app ego notification: %p %s %s\n",
- ego, name, ego_pub_str);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Got app ego notification: %p %s %s\n",
+ test, ego, name, ego_pub_str);
GNUNET_free (ego_pub_str);
if (NULL != strstr (name, host_name) && TEST_HOST_CREATE == test)
host_recv_zone_add_place_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Zone add place result: %" PRId64 " (%.*s).\n",
test, result, data_size, (const char *) data);
GNUNET_assert (GNUNET_YES == result);
zone_add_place ()
{
test = TEST_ZONE_ADD_PLACE;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Adding place to zone.\n", test);
GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!",
nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym);
char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Farewell: nym %s (%s) has left the place.\n",
- GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Farewell: nym %s (%s) has left the place.\n",
+ test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str);
GNUNET_free (str);
GNUNET_assert (1 == GNUNET_PSYC_env_get_count (env));
if (0 != memcmp (&guest_pub_key, nym_key, sizeof (*nym_key)))
{
str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&guest_pub_key);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Farewell: nym does not match guest: %s\n", str);
+ "Test #%u: Farewell: nym does not match guest: %s\n",
+ test, str);
GNUNET_free (str);
GNUNET_assert (0);
}
static void
guest_left (void *cls)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "The guest has left the place.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: The guest has left the place.\n", test);
}
uint16_t data_size)
{
struct ResultClosure *rcls = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "guest_look_for_result: %" PRId64 "\n", result_code);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: guest_look_for_result: %" PRId64 "\n",
+ test, result_code);
GNUNET_assert (GNUNET_OK == result_code);
GNUNET_assert (3 == rcls->n);
GNUNET_free (rcls);
{
struct ResultClosure *rcls = cls;
rcls->n++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "guest_look_for_var: %s\n%.*s\n",
- name, value_size, (const char *) value);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: guest_look_for_var: %s\n%.*s\n",
+ test, name, value_size, (const char *) value);
}
{
struct ResultClosure *rcls = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "guest_look_at_result: %" PRId64 "\n", result_code);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: guest_look_at_result: %" PRId64 "\n",
+ test, result_code);
GNUNET_assert (GNUNET_OK == result_code);
GNUNET_assert (1 == rcls->n);
GNUNET_free (rcls);
struct ResultClosure *rcls = cls;
rcls->n++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "guest_look_at_var: %s\n%.*s\n",
- name, value_size, (const char *) value);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: guest_look_at_var: %s\n%.*s\n",
+ test ,name, value_size, (const char *) value);
}
guest_recv_history_replay_latest_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received latest history replay result "
"(%" PRIu32 " messages, %" PRId64 " fragments):\n"
"%.*s\n",
guest_recv_history_replay_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received history replay result: %" PRId64 "\n"
"%.*s\n",
test, result, data_size, (const char *) data);
uint64_t message_id,
const char *method_name)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received method for message ID %" PRIu64 ":\n"
"%s (flags: %x)\n",
test, message_id, method_name, ntohl (meth->flags));
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received modifier for message ID %" PRIu64 ":\n"
"%c%s: %.*s (size: %u)\n",
test, message_id, oper, name, value_size, (const char *) value, value_size);
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n"
"%c%s: %.*s (size: %u)\n",
test, message_id, oper, name, value_size, (const char *) value, value_size);
const void *data,
uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received data for message ID %" PRIu64 ":\n"
"%.*s\n",
test, message_id, data_size, (const char *) data);
uint64_t message_id,
uint8_t is_cancelled)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received end of message ID %" PRIu64
", cancelled: %u\n",
test, message_id, is_cancelled);
uint64_t message_id,
const char *method_name)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host received method for message ID %" PRIu64 ":\n"
"%s\n",
test, message_id, method_name);
uint16_t value_size,
uint16_t full_value_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host received modifier for message ID %" PRIu64 ":\n"
"%c%s: %.*s\n",
test, message_id, oper, name, value_size, (const char *) value);
const void *data,
uint16_t data_size)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host received data for message ID %" PRIu64 ":\n"
"%.*s\n",
test, message_id, data_size, (const char *) data);
uint64_t message_id,
uint8_t is_cancelled)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host received end of message ID %" PRIu64
", cancelled: %u\n",
test, message_id, is_cancelled);
default:
if (TEST_GUEST_LEAVE <= test)
break;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "invalid test: %d\n", test);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid test: #%u\n", test);
GNUNET_assert (0);
}
}
{
test = TEST_HOST_ANNOUNCE;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host announcement.\n", test);
tmit = (struct TransmitClosure) {};
test = TEST_HOST_ANNOUNCE2;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host announcement 2.\n", test);
tmit = (struct TransmitClosure) {};
int is_admitted,
const struct GNUNET_PSYC_Message *entry_msg)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest received entry decision (try %u): %d.\n",
test, join_req_count, is_admitted);
{
join_req_count++;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Host received entry request from guest (try %u).\n",
(uint8_t) test, join_req_count);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
uint64_t max_message_id)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Guest entered to local place: %d\n",
test, result);
GNUNET_assert (0 <= result);
static void
guest_enter ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Entering to place as guest.\n", test);
struct GuestEnterMessage *emsg = &guest_enter_msg;
guest_enter_by_name ()
{
test = TEST_GUEST_ENTER_BY_NAME;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test #%u: Entering to place by name as guest.\n", test);
struct GuestEnterMessage *emsg = &guest_enter_msg;
if (NULL != emsg)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Could not create guest identity: %s\n", emsg);
+ "Test #%u: Could not create guest identity: %s\n",
+ test, emsg);
#if ! DEBUG_TEST_SOCIAL
GNUNET_assert (0);
#endif
{
place_pub_key = *home_pub_key;
GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Host entered to place %s\n", GNUNET_h2s (&place_pub_hash));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Host entered to place %s\n",
+ test, GNUNET_h2s (&place_pub_hash));
test = TEST_GUEST_CREATE;
GNUNET_IDENTITY_create (id, guest_name, &id_guest_created, NULL);
host_recv_method, host_recv_modifier,
host_recv_data, host_recv_eom, NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Entering to place as host.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test #%u: Entering to place as host.\n", test);
test = TEST_HOST_ENTER;
hst = GNUNET_SOCIAL_host_enter (app, host_ego,
GNUNET_PSYC_CHANNEL_PRIVATE,
if (NULL != emsg)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Could not create host identity: %s\n", emsg);
+ "Test #%u: Could not create host identity: %s\n",
+ test, emsg);
#if ! DEBUG_TEST_SOCIAL
GNUNET_assert (0);
#endif