diff options
-rw-r--r-- | src/testing/testing.c | 16 | ||||
-rw-r--r-- | src/testing/testing_group.c | 45 |
2 files changed, 34 insertions, 27 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index df2a67668..4df4e5595 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -431,7 +431,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
431 | if (NULL == d->hostname) | 431 | if (NULL == d->hostname) |
432 | { | 432 | { |
433 | #if DEBUG_TESTING | 433 | #if DEBUG_TESTING |
434 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 434 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
435 | "Starting `%s', with command `%s %s %s %s %s %s'.\n", | 435 | "Starting `%s', with command `%s %s %s %s %s %s'.\n", |
436 | "gnunet-arm", "gnunet-arm", "-c", d->cfgfile, "-L", "DEBUG", | 436 | "gnunet-arm", "gnunet-arm", "-c", d->cfgfile, "-L", "DEBUG", |
437 | "-s"); | 437 | "-s"); |
@@ -546,13 +546,13 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
546 | return; | 546 | return; |
547 | } | 547 | } |
548 | #if DEBUG_TESTING | 548 | #if DEBUG_TESTING |
549 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Successfully started `%s'.\n", | 549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Successfully started `%s'.\n", |
550 | "gnunet-arm"); | 550 | "gnunet-arm"); |
551 | #endif | 551 | #endif |
552 | GNUNET_free (d->proc); | 552 | GNUNET_free (d->proc); |
553 | d->phase = SP_START_CORE; | 553 | d->phase = SP_START_CORE; |
554 | #if DEBUG_TESTING | 554 | #if DEBUG_TESTING |
555 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Calling CORE_connect\n"); | 555 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Calling CORE_connect\n"); |
556 | #endif | 556 | #endif |
557 | /* Fall through */ | 557 | /* Fall through */ |
558 | case SP_START_CORE: | 558 | case SP_START_CORE: |
@@ -1891,7 +1891,7 @@ connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1891 | struct GNUNET_TESTING_ConnectContext *ctx = cls; | 1891 | struct GNUNET_TESTING_ConnectContext *ctx = cls; |
1892 | 1892 | ||
1893 | #if DEBUG_TESTING | 1893 | #if DEBUG_TESTING |
1894 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Connected peer %s to peer %s\n", | 1894 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected peer %s to peer %s\n", |
1895 | ctx->d1->shortname, GNUNET_i2s (peer)); | 1895 | ctx->d1->shortname, GNUNET_i2s (peer)); |
1896 | #endif | 1896 | #endif |
1897 | 1897 | ||
@@ -1930,13 +1930,13 @@ send_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1930 | #endif | 1930 | #endif |
1931 | GNUNET_TRANSPORT_offer_hello (ctx->d1th, hello, NULL, NULL); | 1931 | GNUNET_TRANSPORT_offer_hello (ctx->d1th, hello, NULL, NULL); |
1932 | GNUNET_assert (ctx->d1core != NULL); | 1932 | GNUNET_assert (ctx->d1core != NULL); |
1933 | GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id); | ||
1934 | #if DEBUG_TESTING | 1933 | #if DEBUG_TESTING |
1935 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1934 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1936 | "Sending connect request to CORE of %s for peer %s\n", | 1935 | "Sending connect request to TRANSPORT of %s for peer %s\n", |
1937 | GNUNET_i2s (&ctx->d1->id), | 1936 | GNUNET_i2s (&ctx->d1->id), |
1938 | GNUNET_h2s (&ctx->d2->id.hashPubKey)); | 1937 | GNUNET_h2s (&ctx->d2->id.hashPubKey)); |
1939 | #endif | 1938 | #endif |
1939 | GNUNET_TRANSPORT_try_connect (ctx->d1th, &ctx->d2->id); | ||
1940 | ctx->timeout_hello = | 1940 | ctx->timeout_hello = |
1941 | GNUNET_TIME_relative_add (ctx->timeout_hello, | 1941 | GNUNET_TIME_relative_add (ctx->timeout_hello, |
1942 | GNUNET_TIME_relative_multiply | 1942 | GNUNET_TIME_relative_multiply |
@@ -1985,7 +1985,7 @@ reattempt_daemons_connect (void *cls, | |||
1985 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 1985 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1986 | return; | 1986 | return; |
1987 | #if DEBUG_TESTING_RECONNECT | 1987 | #if DEBUG_TESTING_RECONNECT |
1988 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1988 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1989 | "re-attempting connect of peer %s to peer %s\n", | 1989 | "re-attempting connect of peer %s to peer %s\n", |
1990 | ctx->d1->shortname, ctx->d2->shortname); | 1990 | ctx->d1->shortname, ctx->d2->shortname); |
1991 | #endif | 1991 | #endif |
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 1889cf7df..807653045 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -3393,7 +3393,7 @@ core_connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
3393 | struct PeerData *other_peer; | 3393 | struct PeerData *other_peer; |
3394 | #endif | 3394 | #endif |
3395 | #if DEBUG_TESTING | 3395 | #if DEBUG_TESTING |
3396 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Connected peer %s to peer %s\n", | 3396 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected peer %s to peer %s\n", |
3397 | ctx->d1->shortname, GNUNET_i2s (peer)); | 3397 | ctx->d1->shortname, GNUNET_i2s (peer)); |
3398 | #endif | 3398 | #endif |
3399 | 3399 | ||
@@ -3417,7 +3417,7 @@ core_connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
3417 | 3417 | ||
3418 | if (connection == NULL) | 3418 | if (connection == NULL) |
3419 | { | 3419 | { |
3420 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3420 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3421 | "Connected peer %s to %s, not in list (no problem(?))\n", | 3421 | "Connected peer %s to %s, not in list (no problem(?))\n", |
3422 | GNUNET_i2s (peer), send_hello_context->peer->daemon->shortname); | 3422 | GNUNET_i2s (peer), send_hello_context->peer->daemon->shortname); |
3423 | } | 3423 | } |
@@ -3515,7 +3515,7 @@ hello_sent_callback (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3515 | 3515 | ||
3516 | send_hello_context->pg->remaining_hellos--; | 3516 | send_hello_context->pg->remaining_hellos--; |
3517 | #if DEBUG_TESTING | 3517 | #if DEBUG_TESTING |
3518 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Sent HELLO, have %d remaining!\n", | 3518 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent HELLO, have %d remaining!\n", |
3519 | send_hello_context->pg->remaining_hellos); | 3519 | send_hello_context->pg->remaining_hellos); |
3520 | #endif | 3520 | #endif |
3521 | if (send_hello_context->peer_pos == NULL) /* All HELLOs (for this peer!) have been transmitted! */ | 3521 | if (send_hello_context->peer_pos == NULL) /* All HELLOs (for this peer!) have been transmitted! */ |
@@ -3595,8 +3595,8 @@ schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3595 | send_hello_context, NULL, NULL, NULL); | 3595 | send_hello_context, NULL, NULL, NULL); |
3596 | } | 3596 | } |
3597 | #if DEBUG_TESTING | 3597 | #if DEBUG_TESTING |
3598 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3598 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3599 | _("Offering Hello of peer %s to peer %s\n"), | 3599 | _("Offering HELLO of peer %s to peer %s\n"), |
3600 | send_hello_context->peer->daemon->shortname, | 3600 | send_hello_context->peer->daemon->shortname, |
3601 | pg->peers[send_hello_context->peer_pos->index]. | 3601 | pg->peers[send_hello_context->peer_pos->index]. |
3602 | daemon->shortname); | 3602 | daemon->shortname); |
@@ -3709,7 +3709,7 @@ schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3709 | (pg->stop_connects == GNUNET_YES)) | 3709 | (pg->stop_connects == GNUNET_YES)) |
3710 | { | 3710 | { |
3711 | #if VERBOSE_TESTING | 3711 | #if VERBOSE_TESTING |
3712 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3712 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3713 | _ | 3713 | _ |
3714 | ("Delaying connect, we have too many outstanding connections!\n")); | 3714 | ("Delaying connect, we have too many outstanding connections!\n")); |
3715 | #endif | 3715 | #endif |
@@ -3720,7 +3720,7 @@ schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3720 | return; | 3720 | return; |
3721 | } | 3721 | } |
3722 | #if VERBOSE_TESTING | 3722 | #if VERBOSE_TESTING |
3723 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 3723 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3724 | _ | 3724 | _ |
3725 | ("Creating connection, outstanding_connections is %d (max %d)\n"), | 3725 | ("Creating connection, outstanding_connections is %d (max %d)\n"), |
3726 | pg->outstanding_connects, pg->max_outstanding_connections); | 3726 | pg->outstanding_connects, pg->max_outstanding_connections); |
@@ -4199,8 +4199,10 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg, | |||
4199 | 4199 | ||
4200 | if ((unblacklisted_connections > 0) && (restrict_transports != NULL)) | 4200 | if ((unblacklisted_connections > 0) && (restrict_transports != NULL)) |
4201 | { | 4201 | { |
4202 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Creating blacklist with `%s'\n", | 4202 | #if DEBUG_TESTING |
4203 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating blacklist with `%s'\n", | ||
4203 | restrict_transports); | 4204 | restrict_transports); |
4205 | #endif | ||
4204 | ret = create_and_copy_blacklist_files (pg, restrict_transports); | 4206 | ret = create_and_copy_blacklist_files (pg, restrict_transports); |
4205 | if (ret != GNUNET_OK) | 4207 | if (ret != GNUNET_OK) |
4206 | { | 4208 | { |
@@ -5831,9 +5833,11 @@ start_peer_helper (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
5831 | GNUNET_OS_start_process (NULL, NULL, "ssh", "ssh", arg, | 5833 | GNUNET_OS_start_process (NULL, NULL, "ssh", "ssh", arg, |
5832 | "peerStartHelper.pl", tempdir, NULL); | 5834 | "peerStartHelper.pl", tempdir, NULL); |
5833 | GNUNET_assert (helper->proc != NULL); | 5835 | GNUNET_assert (helper->proc != NULL); |
5834 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 5836 | #if DEBUG_TESTING |
5837 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
5835 | "starting peers with cmd ssh %s %s %s\n", arg, | 5838 | "starting peers with cmd ssh %s %s %s\n", arg, |
5836 | "peerStartHelper.pl", tempdir); | 5839 | "peerStartHelper.pl", tempdir); |
5840 | #endif | ||
5837 | GNUNET_SCHEDULER_add_now (&check_peers_started, helper); | 5841 | GNUNET_SCHEDULER_add_now (&check_peers_started, helper); |
5838 | GNUNET_free (tempdir); | 5842 | GNUNET_free (tempdir); |
5839 | GNUNET_free (baseservicehome); | 5843 | GNUNET_free (baseservicehome); |
@@ -6102,11 +6106,11 @@ GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
6102 | 6106 | ||
6103 | if (GNUNET_YES != GNUNET_DISK_file_size (hostkeys_file, &fs, GNUNET_YES)) | 6107 | if (GNUNET_YES != GNUNET_DISK_file_size (hostkeys_file, &fs, GNUNET_YES)) |
6104 | fs = 0; | 6108 | fs = 0; |
6105 | 6109 | #if DEBUG_TESTING | |
6106 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 6110 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
6107 | "Found file size %llu for hostkeys, expect hostkeys to be size %d\n", | 6111 | "Found file size %llu for hostkeys\n", |
6108 | fs, HOSTKEYFILESIZE); | 6112 | fs); |
6109 | 6113 | #endif | |
6110 | if (0 != (fs % HOSTKEYFILESIZE)) | 6114 | if (0 != (fs % HOSTKEYFILESIZE)) |
6111 | { | 6115 | { |
6112 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 6116 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -6249,8 +6253,10 @@ GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
6249 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", | 6253 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", |
6250 | &baseservicehome)) | 6254 | &baseservicehome)) |
6251 | { | 6255 | { |
6252 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "baseservice home is %s\n", | 6256 | #if DEBUG_TESTING |
6257 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "baseservice home is %s\n", | ||
6253 | baseservicehome); | 6258 | baseservicehome); |
6259 | #endif | ||
6254 | if (hostname != NULL) | 6260 | if (hostname != NULL) |
6255 | GNUNET_asprintf (&newservicehome, "%s/%s/", baseservicehome, | 6261 | GNUNET_asprintf (&newservicehome, "%s/%s/", baseservicehome, |
6256 | hostname); | 6262 | hostname); |
@@ -6282,10 +6288,11 @@ GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
6282 | proc = | 6288 | proc = |
6283 | GNUNET_OS_start_process (NULL, NULL, "rsync", "rsync", "-r", | 6289 | GNUNET_OS_start_process (NULL, NULL, "rsync", "rsync", "-r", |
6284 | newservicehome, arg, NULL); | 6290 | newservicehome, arg, NULL); |
6285 | 6291 | #if DEBUG_TESTING | |
6286 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 6292 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
6287 | "copying directory with command rsync -r %s %s\n", | 6293 | "copying directory with command rsync -r %s %s\n", |
6288 | newservicehome, arg); | 6294 | newservicehome, arg); |
6295 | #endif | ||
6289 | GNUNET_free (newservicehome); | 6296 | GNUNET_free (newservicehome); |
6290 | GNUNET_free (arg); | 6297 | GNUNET_free (arg); |
6291 | if (NULL == proc) | 6298 | if (NULL == proc) |
@@ -6702,7 +6709,7 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg, | |||
6702 | for (i = 0; i < voff; i++) | 6709 | for (i = 0; i < voff; i++) |
6703 | { | 6710 | { |
6704 | #if DEBUG_CHURN | 6711 | #if DEBUG_CHURN |
6705 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Stopping peer %d!\n", | 6712 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peer %d!\n", |
6706 | running_arr[running_permute[i]]); | 6713 | running_arr[running_permute[i]]); |
6707 | #endif | 6714 | #endif |
6708 | GNUNET_assert (running_arr != NULL); | 6715 | GNUNET_assert (running_arr != NULL); |
@@ -6724,7 +6731,7 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg, | |||
6724 | for (i = 0; i < von; i++) | 6731 | for (i = 0; i < von; i++) |
6725 | { | 6732 | { |
6726 | #if DEBUG_CHURN | 6733 | #if DEBUG_CHURN |
6727 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Starting up peer %d!\n", | 6734 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting up peer %d!\n", |
6728 | stopped_arr[stopped_permute[i]]); | 6735 | stopped_arr[stopped_permute[i]]); |
6729 | #endif | 6736 | #endif |
6730 | GNUNET_assert (stopped_arr != NULL); | 6737 | GNUNET_assert (stopped_arr != NULL); |
@@ -6776,7 +6783,7 @@ GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg, | |||
6776 | for (i = 0; i < pg->total; i++) | 6783 | for (i = 0; i < pg->total; i++) |
6777 | { | 6784 | { |
6778 | #if DEBUG_START | 6785 | #if DEBUG_START |
6779 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 6786 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
6780 | "Starting up service %s on peer %d!\n", service, | 6787 | "Starting up service %s on peer %d!\n", service, |
6781 | stopped_arr[stopped_permute[i]]); | 6788 | stopped_arr[stopped_permute[i]]); |
6782 | #endif | 6789 | #endif |