aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-08-18 14:41:03 +0000
committerGabor X Toth <*@tg-x.net>2016-08-18 14:41:03 +0000
commita50f647a3892357556f93a559b3dad35517dcca0 (patch)
tree27713fbe9d3d23902fc523740e4f5d9315d71807 /src
parent7f937e3781f36538d9864fa841822eecdaf0bf27 (diff)
downloadgnunet-a50f647a3892357556f93a559b3dad35517dcca0.tar.gz
gnunet-a50f647a3892357556f93a559b3dad35517dcca0.zip
social: debug msgs
Diffstat (limited to 'src')
-rw-r--r--src/social/social_api.c8
-rw-r--r--src/social/test_social.c143
2 files changed, 83 insertions, 68 deletions
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 583ce6d1e..f73ae17df 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -1067,11 +1067,11 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
1067 1067
1068void 1068void
1069place_disconnect (struct GNUNET_SOCIAL_Place *plc, 1069place_disconnect (struct GNUNET_SOCIAL_Place *plc,
1070 GNUNET_ContinuationCallback disconnect_cb, 1070 GNUNET_ContinuationCallback cb,
1071 void *disconnect_cls) 1071 void *cls)
1072{ 1072{
1073 plc->disconnect_cb = disconnect_cb; 1073 plc->disconnect_cb = cb;
1074 plc->disconnect_cls = disconnect_cls; 1074 plc->disconnect_cls = cls;
1075 1075
1076 if (NULL != plc->mq) 1076 if (NULL != plc->mq)
1077 { 1077 {
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 6de31eb83..5ab6c83fa 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -260,7 +260,8 @@ end_normally (void *cls)
260static void 260static void
261end () 261end ()
262{ 262{
263 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending tests.\n"); 263 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
264 "Test #%u: Ending tests.\n", test);
264 265
265 if (end_badly_task != NULL) 266 if (end_badly_task != NULL)
266 { 267 {
@@ -276,8 +277,8 @@ transmit_resume (void *cls)
276{ 277{
277 struct TransmitClosure *tmit = cls; 278 struct TransmitClosure *tmit = cls;
278 279
279 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 280 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
280 "Transmission resumed.\n"); 281 "Test #%u: Transmission resumed.\n", test);
281 if (NULL != tmit->host_ann) 282 if (NULL != tmit->host_ann)
282 GNUNET_SOCIAL_host_announce_resume (tmit->host_ann); 283 GNUNET_SOCIAL_host_announce_resume (tmit->host_ann);
283 else 284 else
@@ -301,10 +302,10 @@ notify_data (void *cls, uint16_t *data_size, void *data)
301 } 302 }
302 303
303 uint16_t size = strlen (tmit->data[tmit->n]); 304 uint16_t size = strlen (tmit->data[tmit->n]);
304 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 305 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
305 "Transmit notify data: %u bytes available, " 306 "Test #%u: Transmit notify data: %u bytes available, "
306 "processing fragment %u/%u (size %u).\n", 307 "processing fragment %u/%u (size %u).\n",
307 *data_size, tmit->n + 1, tmit->data_count, size); 308 test, *data_size, tmit->n + 1, tmit->data_count, size);
308 if (*data_size < size) 309 if (*data_size < size)
309 { 310 {
310 *data_size = 0; 311 *data_size = 0;
@@ -314,7 +315,8 @@ notify_data (void *cls, uint16_t *data_size, void *data)
314 315
315 if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n]) 316 if (GNUNET_YES != tmit->paused && 0 < tmit->data_delay[tmit->n])
316 { 317 {
317 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission paused.\n"); 318 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
319 "Test #%u: Transmission paused.\n", test);
318 tmit->paused = GNUNET_YES; 320 tmit->paused = GNUNET_YES;
319 GNUNET_SCHEDULER_add_delayed ( 321 GNUNET_SCHEDULER_add_delayed (
320 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 322 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
@@ -335,8 +337,8 @@ notify_data (void *cls, uint16_t *data_size, void *data)
335static void 337static void
336host_left () 338host_left ()
337{ 339{
338 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 340 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
339 "The host has left the place.\n"); 341 "Test #%u: The host has left the place.\n", test);
340 end (); 342 end ();
341} 343}
342 344
@@ -369,7 +371,7 @@ host_reconnected (void *cls, int result,
369{ 371{
370 place_pub_key = *home_pub_key; 372 place_pub_key = *home_pub_key;
371 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); 373 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
372 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 374 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
373 "Test #%u: Host reconnected to place %s\n", 375 "Test #%u: Host reconnected to place %s\n",
374 test, GNUNET_h2s (&place_pub_hash)); 376 test, GNUNET_h2s (&place_pub_hash));
375 377
@@ -386,7 +388,7 @@ guest_reconnected (void *cls, int result,
386 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, 388 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
387 uint64_t max_message_id) 389 uint64_t max_message_id)
388{ 390{
389 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 391 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
390 "Test #%u: Guest reconnected to place: %d\n", 392 "Test #%u: Guest reconnected to place: %d\n",
391 test, result); 393 test, result);
392 GNUNET_assert (0 <= result); 394 GNUNET_assert (0 <= result);
@@ -402,8 +404,8 @@ guest_reconnected (void *cls, int result,
402static void 404static void
403app_connected (void *cls) 405app_connected (void *cls)
404{ 406{
405 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 407 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
406 "App connected: %p\n", cls); 408 "Test #%u: App connected: %p\n", test, cls);
407 if (NULL != core) 409 if (NULL != core)
408 { 410 {
409 GNUNET_CORE_disconnecT (core); 411 GNUNET_CORE_disconnecT (core);
@@ -422,14 +424,17 @@ app_recv_host (void *cls,
422 struct GNUNET_HashCode host_pub_hash; 424 struct GNUNET_HashCode host_pub_hash;
423 GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash); 425 GNUNET_CRYPTO_hash (host_pub_key, sizeof (*host_pub_key), &host_pub_hash);
424 426
425 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 427 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
426 "Got app host place notification: %s\n", 428 "Test #%u: Got app host place notification: %s\n",
427 GNUNET_h2s (&host_pub_hash)); 429 test, GNUNET_h2s (&host_pub_hash));
428 430
429 if (test == TEST_RECONNECT) 431 if (test == TEST_RECONNECT)
430 { 432 {
431 if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key))) 433 if (0 == memcmp (&place_pub_key, host_pub_key, sizeof (*host_pub_key)))
432 { 434 {
435 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
436 "Test #%u: Reconnecting to host place: %s\n",
437 test, GNUNET_h2s (&host_pub_hash));
433 hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected, 438 hst = GNUNET_SOCIAL_host_enter_reconnect (hconn, host_slicer, host_reconnected,
434 host_answer_door, host_farewell2, NULL); 439 host_answer_door, host_farewell2, NULL);
435 } 440 }
@@ -447,14 +452,17 @@ app_recv_guest (void *cls,
447 struct GNUNET_HashCode guest_pub_hash; 452 struct GNUNET_HashCode guest_pub_hash;
448 GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash); 453 GNUNET_CRYPTO_hash (guest_pub_key, sizeof (*guest_pub_key), &guest_pub_hash);
449 454
450 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 455 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
451 "Got app guest place notification: %s\n", 456 "Test #%u: Got app guest place notification: %s\n",
452 GNUNET_h2s (&guest_pub_hash)); 457 test, GNUNET_h2s (&guest_pub_hash));
453 458
454 if (test == TEST_RECONNECT) 459 if (test == TEST_RECONNECT)
455 { 460 {
456 if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key))) 461 if (0 == memcmp (&place_pub_key, guest_pub_key, sizeof (*guest_pub_key)))
457 { 462 {
463 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
464 "Test #%u: Reconnecting to guest place: %s\n",
465 test, GNUNET_h2s (&guest_pub_hash));
458 gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE, 466 gst = GNUNET_SOCIAL_guest_enter_reconnect (gconn, GNUNET_PSYC_SLAVE_JOIN_NONE,
459 guest_slicer, guest_reconnected, NULL); 467 guest_slicer, guest_reconnected, NULL);
460 } 468 }
@@ -469,9 +477,9 @@ app_recv_ego (void *cls,
469 const char *name) 477 const char *name)
470{ 478{
471 char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key); 479 char *ego_pub_str = GNUNET_CRYPTO_ecdsa_public_key_to_string (ego_pub_key);
472 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 480 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
473 "Got app ego notification: %p %s %s\n", 481 "Test #%u: Got app ego notification: %p %s %s\n",
474 ego, name, ego_pub_str); 482 test, ego, name, ego_pub_str);
475 GNUNET_free (ego_pub_str); 483 GNUNET_free (ego_pub_str);
476 484
477 if (NULL != strstr (name, host_name) && TEST_HOST_CREATE == test) 485 if (NULL != strstr (name, host_name) && TEST_HOST_CREATE == test)
@@ -515,7 +523,7 @@ static void
515host_recv_zone_add_place_result (void *cls, int64_t result, 523host_recv_zone_add_place_result (void *cls, int64_t result,
516 const void *data, uint16_t data_size) 524 const void *data, uint16_t data_size)
517{ 525{
518 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 526 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
519 "Test #%u: Zone add place result: %" PRId64 " (%.*s).\n", 527 "Test #%u: Zone add place result: %" PRId64 " (%.*s).\n",
520 test, result, data_size, (const char *) data); 528 test, result, data_size, (const char *) data);
521 GNUNET_assert (GNUNET_YES == result); 529 GNUNET_assert (GNUNET_YES == result);
@@ -529,7 +537,7 @@ static void
529zone_add_place () 537zone_add_place ()
530{ 538{
531 test = TEST_ZONE_ADD_PLACE; 539 test = TEST_ZONE_ADD_PLACE;
532 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 540 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
533 "Test #%u: Adding place to zone.\n", test); 541 "Test #%u: Adding place to zone.\n", test);
534 542
535 GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!", 543 GNUNET_SOCIAL_zone_add_place (app, host_ego, "home", "let.me*in!",
@@ -548,16 +556,17 @@ host_farewell (void *cls,
548 nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym); 556 nym_key = GNUNET_SOCIAL_nym_get_pub_key (nym);
549 557
550 char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key); 558 char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (nym_key);
551 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 559 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
552 "Farewell: nym %s (%s) has left the place.\n", 560 "Test #%u: Farewell: nym %s (%s) has left the place.\n",
553 GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str); 561 test, GNUNET_h2s (GNUNET_SOCIAL_nym_get_pub_key_hash (nym)), str);
554 GNUNET_free (str); 562 GNUNET_free (str);
555 GNUNET_assert (1 == GNUNET_PSYC_env_get_count (env)); 563 GNUNET_assert (1 == GNUNET_PSYC_env_get_count (env));
556 if (0 != memcmp (&guest_pub_key, nym_key, sizeof (*nym_key))) 564 if (0 != memcmp (&guest_pub_key, nym_key, sizeof (*nym_key)))
557 { 565 {
558 str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&guest_pub_key); 566 str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&guest_pub_key);
559 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 567 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
560 "Farewell: nym does not match guest: %s\n", str); 568 "Test #%u: Farewell: nym does not match guest: %s\n",
569 test, str);
561 GNUNET_free (str); 570 GNUNET_free (str);
562 GNUNET_assert (0); 571 GNUNET_assert (0);
563 } 572 }
@@ -568,8 +577,8 @@ host_farewell (void *cls,
568static void 577static void
569guest_left (void *cls) 578guest_left (void *cls)
570{ 579{
571 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 580 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
572 "The guest has left the place.\n"); 581 "Test #%u: The guest has left the place.\n", test);
573} 582}
574 583
575 584
@@ -605,8 +614,9 @@ guest_look_for_result (void *cls,
605 uint16_t data_size) 614 uint16_t data_size)
606{ 615{
607 struct ResultClosure *rcls = cls; 616 struct ResultClosure *rcls = cls;
608 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 617 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
609 "guest_look_for_result: %" PRId64 "\n", result_code); 618 "Test #%u: guest_look_for_result: %" PRId64 "\n",
619 test, result_code);
610 GNUNET_assert (GNUNET_OK == result_code); 620 GNUNET_assert (GNUNET_OK == result_code);
611 GNUNET_assert (3 == rcls->n); 621 GNUNET_assert (3 == rcls->n);
612 GNUNET_free (rcls); 622 GNUNET_free (rcls);
@@ -624,9 +634,9 @@ guest_look_for_var (void *cls,
624{ 634{
625 struct ResultClosure *rcls = cls; 635 struct ResultClosure *rcls = cls;
626 rcls->n++; 636 rcls->n++;
627 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 637 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
628 "guest_look_for_var: %s\n%.*s\n", 638 "Test #%u: guest_look_for_var: %s\n%.*s\n",
629 name, value_size, (const char *) value); 639 test, name, value_size, (const char *) value);
630} 640}
631 641
632 642
@@ -645,8 +655,9 @@ guest_look_at_result (void *cls, int64_t result_code,
645{ 655{
646 struct ResultClosure *rcls = cls; 656 struct ResultClosure *rcls = cls;
647 657
648 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 658 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
649 "guest_look_at_result: %" PRId64 "\n", result_code); 659 "Test #%u: guest_look_at_result: %" PRId64 "\n",
660 test, result_code);
650 GNUNET_assert (GNUNET_OK == result_code); 661 GNUNET_assert (GNUNET_OK == result_code);
651 GNUNET_assert (1 == rcls->n); 662 GNUNET_assert (1 == rcls->n);
652 GNUNET_free (rcls); 663 GNUNET_free (rcls);
@@ -665,9 +676,9 @@ guest_look_at_var (void *cls,
665 struct ResultClosure *rcls = cls; 676 struct ResultClosure *rcls = cls;
666 rcls->n++; 677 rcls->n++;
667 678
668 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 679 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
669 "guest_look_at_var: %s\n%.*s\n", 680 "Test #%u: guest_look_at_var: %s\n%.*s\n",
670 name, value_size, (const char *) value); 681 test ,name, value_size, (const char *) value);
671} 682}
672 683
673 684
@@ -684,7 +695,7 @@ static void
684guest_recv_history_replay_latest_result (void *cls, int64_t result, 695guest_recv_history_replay_latest_result (void *cls, int64_t result,
685 const void *data, uint16_t data_size) 696 const void *data, uint16_t data_size)
686{ 697{
687 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 698 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
688 "Test #%u: Guest received latest history replay result " 699 "Test #%u: Guest received latest history replay result "
689 "(%" PRIu32 " messages, %" PRId64 " fragments):\n" 700 "(%" PRIu32 " messages, %" PRId64 " fragments):\n"
690 "%.*s\n", 701 "%.*s\n",
@@ -713,7 +724,7 @@ static void
713guest_recv_history_replay_result (void *cls, int64_t result, 724guest_recv_history_replay_result (void *cls, int64_t result,
714 const void *data, uint16_t data_size) 725 const void *data, uint16_t data_size)
715{ 726{
716 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 727 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
717 "Test #%u: Guest received history replay result: %" PRId64 "\n" 728 "Test #%u: Guest received history replay result: %" PRId64 "\n"
718 "%.*s\n", 729 "%.*s\n",
719 test, result, data_size, (const char *) data); 730 test, result, data_size, (const char *) data);
@@ -744,7 +755,7 @@ guest_recv_method (void *cls,
744 uint64_t message_id, 755 uint64_t message_id,
745 const char *method_name) 756 const char *method_name)
746{ 757{
747 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 758 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
748 "Test #%u: Guest received method for message ID %" PRIu64 ":\n" 759 "Test #%u: Guest received method for message ID %" PRIu64 ":\n"
749 "%s (flags: %x)\n", 760 "%s (flags: %x)\n",
750 test, message_id, method_name, ntohl (meth->flags)); 761 test, message_id, method_name, ntohl (meth->flags));
@@ -763,7 +774,7 @@ guest_recv_modifier (void *cls,
763 uint16_t value_size, 774 uint16_t value_size,
764 uint16_t full_value_size) 775 uint16_t full_value_size)
765{ 776{
766 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 777 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
767 "Test #%u: Guest received modifier for message ID %" PRIu64 ":\n" 778 "Test #%u: Guest received modifier for message ID %" PRIu64 ":\n"
768 "%c%s: %.*s (size: %u)\n", 779 "%c%s: %.*s (size: %u)\n",
769 test, message_id, oper, name, value_size, (const char *) value, value_size); 780 test, message_id, oper, name, value_size, (const char *) value, value_size);
@@ -781,7 +792,7 @@ guest_recv_mod_foo_bar (void *cls,
781 uint16_t value_size, 792 uint16_t value_size,
782 uint16_t full_value_size) 793 uint16_t full_value_size)
783{ 794{
784 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 795 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
785 "Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n" 796 "Test #%u: Guest received modifier matching _foo_bar for message ID %" PRIu64 ":\n"
786 "%c%s: %.*s (size: %u)\n", 797 "%c%s: %.*s (size: %u)\n",
787 test, message_id, oper, name, value_size, (const char *) value, value_size); 798 test, message_id, oper, name, value_size, (const char *) value, value_size);
@@ -799,7 +810,7 @@ guest_recv_data (void *cls,
799 const void *data, 810 const void *data,
800 uint16_t data_size) 811 uint16_t data_size)
801{ 812{
802 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 813 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
803 "Test #%u: Guest received data for message ID %" PRIu64 ":\n" 814 "Test #%u: Guest received data for message ID %" PRIu64 ":\n"
804 "%.*s\n", 815 "%.*s\n",
805 test, message_id, data_size, (const char *) data); 816 test, message_id, data_size, (const char *) data);
@@ -814,7 +825,7 @@ guest_recv_eom (void *cls,
814 uint64_t message_id, 825 uint64_t message_id,
815 uint8_t is_cancelled) 826 uint8_t is_cancelled)
816{ 827{
817 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 828 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
818 "Test #%u: Guest received end of message ID %" PRIu64 829 "Test #%u: Guest received end of message ID %" PRIu64
819 ", cancelled: %u\n", 830 ", cancelled: %u\n",
820 test, message_id, is_cancelled); 831 test, message_id, is_cancelled);
@@ -856,7 +867,7 @@ host_recv_method (void *cls,
856 uint64_t message_id, 867 uint64_t message_id,
857 const char *method_name) 868 const char *method_name)
858{ 869{
859 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 870 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
860 "Test #%u: Host received method for message ID %" PRIu64 ":\n" 871 "Test #%u: Host received method for message ID %" PRIu64 ":\n"
861 "%s\n", 872 "%s\n",
862 test, message_id, method_name); 873 test, message_id, method_name);
@@ -875,7 +886,7 @@ host_recv_modifier (void *cls,
875 uint16_t value_size, 886 uint16_t value_size,
876 uint16_t full_value_size) 887 uint16_t full_value_size)
877{ 888{
878 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 889 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
879 "Test #%u: Host received modifier for message ID %" PRIu64 ":\n" 890 "Test #%u: Host received modifier for message ID %" PRIu64 ":\n"
880 "%c%s: %.*s\n", 891 "%c%s: %.*s\n",
881 test, message_id, oper, name, value_size, (const char *) value); 892 test, message_id, oper, name, value_size, (const char *) value);
@@ -890,7 +901,7 @@ host_recv_data (void *cls,
890 const void *data, 901 const void *data,
891 uint16_t data_size) 902 uint16_t data_size)
892{ 903{
893 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 904 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
894 "Test #%u: Host received data for message ID %" PRIu64 ":\n" 905 "Test #%u: Host received data for message ID %" PRIu64 ":\n"
895 "%.*s\n", 906 "%.*s\n",
896 test, message_id, data_size, (const char *) data); 907 test, message_id, data_size, (const char *) data);
@@ -904,7 +915,7 @@ host_recv_eom (void *cls,
904 uint64_t message_id, 915 uint64_t message_id,
905 uint8_t is_cancelled) 916 uint8_t is_cancelled)
906{ 917{
907 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 918 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
908 "Test #%u: Host received end of message ID %" PRIu64 919 "Test #%u: Host received end of message ID %" PRIu64
909 ", cancelled: %u\n", 920 ", cancelled: %u\n",
910 test, message_id, is_cancelled); 921 test, message_id, is_cancelled);
@@ -934,7 +945,7 @@ host_recv_eom (void *cls,
934 default: 945 default:
935 if (TEST_GUEST_LEAVE <= test) 946 if (TEST_GUEST_LEAVE <= test)
936 break; 947 break;
937 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "invalid test: %d\n", test); 948 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid test: #%u\n", test);
938 GNUNET_assert (0); 949 GNUNET_assert (0);
939 } 950 }
940} 951}
@@ -969,7 +980,7 @@ host_announce ()
969{ 980{
970 test = TEST_HOST_ANNOUNCE; 981 test = TEST_HOST_ANNOUNCE;
971 982
972 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 983 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
973 "Test #%u: Host announcement.\n", test); 984 "Test #%u: Host announcement.\n", test);
974 985
975 tmit = (struct TransmitClosure) {}; 986 tmit = (struct TransmitClosure) {};
@@ -1003,7 +1014,7 @@ host_announce2 ()
1003 1014
1004 test = TEST_HOST_ANNOUNCE2; 1015 test = TEST_HOST_ANNOUNCE2;
1005 1016
1006 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1017 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1007 "Test #%u: Host announcement 2.\n", test); 1018 "Test #%u: Host announcement 2.\n", test);
1008 1019
1009 tmit = (struct TransmitClosure) {}; 1020 tmit = (struct TransmitClosure) {};
@@ -1031,7 +1042,7 @@ guest_recv_entry_decision (void *cls,
1031 int is_admitted, 1042 int is_admitted,
1032 const struct GNUNET_PSYC_Message *entry_msg) 1043 const struct GNUNET_PSYC_Message *entry_msg)
1033{ 1044{
1034 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1045 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1035 "Test #%u: Guest received entry decision (try %u): %d.\n", 1046 "Test #%u: Guest received entry decision (try %u): %d.\n",
1036 test, join_req_count, is_admitted); 1047 test, join_req_count, is_admitted);
1037 1048
@@ -1085,7 +1096,7 @@ host_answer_door (void *cls,
1085{ 1096{
1086 join_req_count++; 1097 join_req_count++;
1087 1098
1088 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1099 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1089 "Test #%u: Host received entry request from guest (try %u).\n", 1100 "Test #%u: Host received entry request from guest (try %u).\n",
1090 (uint8_t) test, join_req_count); 1101 (uint8_t) test, join_req_count);
1091 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1102 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1123,7 +1134,7 @@ guest_recv_local_enter (void *cls, int result,
1123 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, 1134 const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
1124 uint64_t max_message_id) 1135 uint64_t max_message_id)
1125{ 1136{
1126 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1137 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1127 "Test #%u: Guest entered to local place: %d\n", 1138 "Test #%u: Guest entered to local place: %d\n",
1128 test, result); 1139 test, result);
1129 GNUNET_assert (0 <= result); 1140 GNUNET_assert (0 <= result);
@@ -1133,7 +1144,7 @@ guest_recv_local_enter (void *cls, int result,
1133static void 1144static void
1134guest_enter () 1145guest_enter ()
1135{ 1146{
1136 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1147 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1137 "Test #%u: Entering to place as guest.\n", test); 1148 "Test #%u: Entering to place as guest.\n", test);
1138 1149
1139 struct GuestEnterMessage *emsg = &guest_enter_msg; 1150 struct GuestEnterMessage *emsg = &guest_enter_msg;
@@ -1165,7 +1176,7 @@ static void
1165guest_enter_by_name () 1176guest_enter_by_name ()
1166{ 1177{
1167 test = TEST_GUEST_ENTER_BY_NAME; 1178 test = TEST_GUEST_ENTER_BY_NAME;
1168 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1179 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1169 "Test #%u: Entering to place by name as guest.\n", test); 1180 "Test #%u: Entering to place by name as guest.\n", test);
1170 1181
1171 struct GuestEnterMessage *emsg = &guest_enter_msg; 1182 struct GuestEnterMessage *emsg = &guest_enter_msg;
@@ -1225,7 +1236,8 @@ id_guest_created (void *cls, const char *emsg)
1225 if (NULL != emsg) 1236 if (NULL != emsg)
1226 { 1237 {
1227 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1238 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1228 "Could not create guest identity: %s\n", emsg); 1239 "Test #%u: Could not create guest identity: %s\n",
1240 test, emsg);
1229#if ! DEBUG_TEST_SOCIAL 1241#if ! DEBUG_TEST_SOCIAL
1230 GNUNET_assert (0); 1242 GNUNET_assert (0);
1231#endif 1243#endif
@@ -1242,8 +1254,9 @@ host_entered (void *cls, int result,
1242{ 1254{
1243 place_pub_key = *home_pub_key; 1255 place_pub_key = *home_pub_key;
1244 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); 1256 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
1245 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1257 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1246 "Host entered to place %s\n", GNUNET_h2s (&place_pub_hash)); 1258 "Test #%u: Host entered to place %s\n",
1259 test, GNUNET_h2s (&place_pub_hash));
1247 1260
1248 test = TEST_GUEST_CREATE; 1261 test = TEST_GUEST_CREATE;
1249 GNUNET_IDENTITY_create (id, guest_name, &id_guest_created, NULL); 1262 GNUNET_IDENTITY_create (id, guest_name, &id_guest_created, NULL);
@@ -1258,7 +1271,8 @@ host_enter ()
1258 host_recv_method, host_recv_modifier, 1271 host_recv_method, host_recv_modifier,
1259 host_recv_data, host_recv_eom, NULL); 1272 host_recv_data, host_recv_eom, NULL);
1260 1273
1261 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Entering to place as host.\n"); 1274 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1275 "Test #%u: Entering to place as host.\n", test);
1262 test = TEST_HOST_ENTER; 1276 test = TEST_HOST_ENTER;
1263 hst = GNUNET_SOCIAL_host_enter (app, host_ego, 1277 hst = GNUNET_SOCIAL_host_enter (app, host_ego,
1264 GNUNET_PSYC_CHANNEL_PRIVATE, 1278 GNUNET_PSYC_CHANNEL_PRIVATE,
@@ -1277,7 +1291,8 @@ id_host_created (void *cls, const char *emsg)
1277 if (NULL != emsg) 1291 if (NULL != emsg)
1278 { 1292 {
1279 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1293 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1280 "Could not create host identity: %s\n", emsg); 1294 "Test #%u: Could not create host identity: %s\n",
1295 test, emsg);
1281#if ! DEBUG_TEST_SOCIAL 1296#if ! DEBUG_TEST_SOCIAL
1282 GNUNET_assert (0); 1297 GNUNET_assert (0);
1283#endif 1298#endif