diff options
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-regex-profiler.c | 1 | ||||
-rw-r--r-- | src/mesh/regex_profiler_test.conf | 3 | ||||
-rw-r--r-- | src/mesh/test_mesh.conf | 4 | ||||
-rw-r--r-- | src/mesh/test_mesh_2dtorus.c | 28 | ||||
-rw-r--r-- | src/mesh/test_mesh_2dtorus.conf | 4 | ||||
-rw-r--r-- | src/mesh/test_mesh_path.conf | 4 | ||||
-rw-r--r-- | src/mesh/test_mesh_regex.c | 27 | ||||
-rw-r--r-- | src/mesh/test_mesh_small.c | 35 | ||||
-rw-r--r-- | src/mesh/test_mesh_small.conf | 4 | ||||
-rw-r--r-- | src/mesh/test_mesh_tree_api.c | 14 |
10 files changed, 10 insertions, 114 deletions
diff --git a/src/mesh/gnunet-regex-profiler.c b/src/mesh/gnunet-regex-profiler.c index fac7b02e5..128ed905e 100644 --- a/src/mesh/gnunet-regex-profiler.c +++ b/src/mesh/gnunet-regex-profiler.c | |||
@@ -1872,6 +1872,7 @@ main (int argc, char *const *argv) | |||
1872 | GNUNET_PROGRAM_run (argc, argv, "gnunet-regex-profiler [OPTIONS] hosts-file policy-dir search-strings-file", | 1872 | GNUNET_PROGRAM_run (argc, argv, "gnunet-regex-profiler [OPTIONS] hosts-file policy-dir search-strings-file", |
1873 | _("Profiler for regex/mesh"), | 1873 | _("Profiler for regex/mesh"), |
1874 | options, &run, NULL); | 1874 | options, &run, NULL); |
1875 | GNUNET_free ((void*) argv); | ||
1875 | if (GNUNET_OK != ret) | 1876 | if (GNUNET_OK != ret) |
1876 | return ret; | 1877 | return ret; |
1877 | if (GNUNET_OK != result) | 1878 | if (GNUNET_OK != result) |
diff --git a/src/mesh/regex_profiler_test.conf b/src/mesh/regex_profiler_test.conf index ebbc9ee2f..938ea3cad 100644 --- a/src/mesh/regex_profiler_test.conf +++ b/src/mesh/regex_profiler_test.conf | |||
@@ -26,7 +26,6 @@ DISABLE_TRY_CONNECT = YES | |||
26 | [arm] | 26 | [arm] |
27 | DEFAULTSERVICES = core mesh dht statistics | 27 | DEFAULTSERVICES = core mesh dht statistics |
28 | PORT = 12003 | 28 | PORT = 12003 |
29 | DEBUG = NO | ||
30 | 29 | ||
31 | [fs] | 30 | [fs] |
32 | AUTOSTART = NO | 31 | AUTOSTART = NO |
@@ -40,7 +39,6 @@ plugins = dht mesh | |||
40 | [transport] | 39 | [transport] |
41 | AUTOSTART = YES | 40 | AUTOSTART = YES |
42 | PLUGINS = tcp | 41 | PLUGINS = tcp |
43 | DEBUG = NO | ||
44 | ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; | 42 | ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; |
45 | ACCEPT_FROM6 = ::1; | 43 | ACCEPT_FROM6 = ::1; |
46 | NEIGHBOUR_LIMIT = 50 | 44 | NEIGHBOUR_LIMIT = 50 |
@@ -67,7 +65,6 @@ ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; | |||
67 | [TESTING] | 65 | [TESTING] |
68 | NUM_PEERS = 5 | 66 | NUM_PEERS = 5 |
69 | WEAKRANDOM = YES | 67 | WEAKRANDOM = YES |
70 | DEBUG = YES | ||
71 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 68 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
72 | MAX_CONCURRENT_SSH = 10 | 69 | MAX_CONCURRENT_SSH = 10 |
73 | USE_PROGRESSBARS = YES | 70 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh.conf b/src/mesh/test_mesh.conf index d8bdd7a13..8b9ca158e 100644 --- a/src/mesh/test_mesh.conf +++ b/src/mesh/test_mesh.conf | |||
@@ -5,7 +5,6 @@ AUTOSTART = NO | |||
5 | AUTOSTART = NO | 5 | AUTOSTART = NO |
6 | 6 | ||
7 | [mesh] | 7 | [mesh] |
8 | DEBUG = YES | ||
9 | AUTOSTART = YES | 8 | AUTOSTART = YES |
10 | ACCEPT_FROM = 127.0.0.1; | 9 | ACCEPT_FROM = 127.0.0.1; |
11 | HOSTNAME = localhost | 10 | HOSTNAME = localhost |
@@ -27,7 +26,6 @@ AUTOSTART = NO | |||
27 | PORT = 10012 | 26 | PORT = 10012 |
28 | 27 | ||
29 | [dht] | 28 | [dht] |
30 | DEBUG = NO | ||
31 | AUTOSTART = YES | 29 | AUTOSTART = YES |
32 | ACCEPT_FROM6 = ::1; | 30 | ACCEPT_FROM6 = ::1; |
33 | ACCEPT_FROM = 127.0.0.1; | 31 | ACCEPT_FROM = 127.0.0.1; |
@@ -43,7 +41,6 @@ DATABASE = sqlite | |||
43 | 41 | ||
44 | [transport] | 42 | [transport] |
45 | PLUGINS = tcp | 43 | PLUGINS = tcp |
46 | DEBUG = NO | ||
47 | ACCEPT_FROM6 = ::1; | 44 | ACCEPT_FROM6 = ::1; |
48 | ACCEPT_FROM = 127.0.0.1; | 45 | ACCEPT_FROM = 127.0.0.1; |
49 | NEIGHBOUR_LIMIT = 50 | 46 | NEIGHBOUR_LIMIT = 50 |
@@ -59,7 +56,6 @@ PORT = 12092 | |||
59 | [arm] | 56 | [arm] |
60 | DEFAULTSERVICES = core | 57 | DEFAULTSERVICES = core |
61 | PORT = 12366 | 58 | PORT = 12366 |
62 | DEBUG = NO | ||
63 | 59 | ||
64 | [transport-tcp] | 60 | [transport-tcp] |
65 | TIMEOUT = 300 s | 61 | TIMEOUT = 300 s |
diff --git a/src/mesh/test_mesh_2dtorus.c b/src/mesh/test_mesh_2dtorus.c index 58777c001..4c1e406ef 100644 --- a/src/mesh/test_mesh_2dtorus.c +++ b/src/mesh/test_mesh_2dtorus.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | 27 | ||
28 | #define VERBOSE GNUNET_YES | ||
29 | #define REMOVE_DIR GNUNET_YES | 28 | #define REMOVE_DIR GNUNET_YES |
30 | 29 | ||
31 | /** | 30 | /** |
@@ -107,13 +106,11 @@ shutdown_callback (void *cls, const char *emsg) | |||
107 | "test: Shutdown of peers failed! (%s)\n", emsg); | 106 | "test: Shutdown of peers failed! (%s)\n", emsg); |
108 | ok--; | 107 | ok--; |
109 | } | 108 | } |
110 | #if VERBOSE | ||
111 | else | 109 | else |
112 | { | 110 | { |
113 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 111 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
114 | "test: All peers successfully shut down!\n"); | 112 | "test: All peers successfully shut down!\n"); |
115 | } | 113 | } |
116 | #endif | ||
117 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 114 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
118 | } | 115 | } |
119 | 116 | ||
@@ -121,10 +118,7 @@ shutdown_callback (void *cls, const char *emsg) | |||
121 | static void | 118 | static void |
122 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 119 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
123 | { | 120 | { |
124 | #if VERBOSE | ||
125 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); | 121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); |
126 | #endif | ||
127 | |||
128 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 122 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
129 | } | 123 | } |
130 | 124 | ||
@@ -201,15 +195,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
201 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 195 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
202 | return; | 196 | return; |
203 | } | 197 | } |
204 | #if VERBOSE | ||
205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
206 | "************************************************************\n"); | 199 | "test: Peer Group started successfully with %u connections\n", |
207 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
208 | "test: Peer Group started successfully!\n"); | ||
209 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n", | ||
210 | total_connections); | 200 | total_connections); |
211 | #endif | ||
212 | |||
213 | peers_running = GNUNET_TESTING_daemons_running (pg); | 201 | peers_running = GNUNET_TESTING_daemons_running (pg); |
214 | if (0 < failed_connections) | 202 | if (0 < failed_connections) |
215 | { | 203 | { |
@@ -287,19 +275,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
287 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 275 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
288 | 276 | ||
289 | GNUNET_log_setup ("test_mesh_2dtorus", | 277 | GNUNET_log_setup ("test_mesh_2dtorus", |
290 | #if VERBOSE | ||
291 | "DEBUG", | ||
292 | #else | ||
293 | "WARNING", | 278 | "WARNING", |
294 | #endif | ||
295 | NULL); | 279 | NULL); |
296 | 280 | ||
297 | #if VERBOSE | ||
298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | ||
299 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
300 | "use_progressbars", "YES"); | ||
301 | #endif | ||
302 | 281 | ||
282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | ||
303 | if (GNUNET_OK != | 283 | if (GNUNET_OK != |
304 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 284 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
305 | "num_peers", &num_peers)) | 285 | "num_peers", &num_peers)) |
@@ -342,10 +322,6 @@ main (int argc, char *argv[]) | |||
342 | argv[0], | 322 | argv[0], |
343 | "-c", | 323 | "-c", |
344 | "test_mesh_2dtorus.conf", | 324 | "test_mesh_2dtorus.conf", |
345 | #if VERBOSE | ||
346 | "-L", | ||
347 | "DEBUG", | ||
348 | #endif | ||
349 | NULL | 325 | NULL |
350 | }; | 326 | }; |
351 | 327 | ||
diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf index b6291fff5..826257139 100644 --- a/src/mesh/test_mesh_2dtorus.conf +++ b/src/mesh/test_mesh_2dtorus.conf | |||
@@ -4,14 +4,12 @@ SERVICEHOME = /tmp/test_mesh_small/ | |||
4 | [arm] | 4 | [arm] |
5 | PORT = 10010 | 5 | PORT = 10010 |
6 | DEFAULTSERVICES = core dht mesh | 6 | DEFAULTSERVICES = core dht mesh |
7 | #DEBUG = YES | ||
8 | 7 | ||
9 | [statistics] | 8 | [statistics] |
10 | AUTOSTART = YES | 9 | AUTOSTART = YES |
11 | PORT = 10000 | 10 | PORT = 10000 |
12 | 11 | ||
13 | [dht] | 12 | [dht] |
14 | DEBUG = NO | ||
15 | AUTOSTART = YES | 13 | AUTOSTART = YES |
16 | ACCEPT_FROM6 = ::1; | 14 | ACCEPT_FROM6 = ::1; |
17 | ACCEPT_FROM = 127.0.0.1; | 15 | ACCEPT_FROM = 127.0.0.1; |
@@ -53,7 +51,6 @@ PORT = 10004 | |||
53 | 51 | ||
54 | [mesh] | 52 | [mesh] |
55 | PORT = 10005 | 53 | PORT = 10005 |
56 | DEBUG=YES | ||
57 | ACCEPT_FROM = 127.0.0.1; | 54 | ACCEPT_FROM = 127.0.0.1; |
58 | HOSTNAME = localhost | 55 | HOSTNAME = localhost |
59 | # PREFIX = valgrind --leak-check=full | 56 | # PREFIX = valgrind --leak-check=full |
@@ -78,7 +75,6 @@ CONNECT_TOPOLOGY = 2D_TORUS | |||
78 | F2F = NO | 75 | F2F = NO |
79 | CONNECT_TIMEOUT = 600 s | 76 | CONNECT_TIMEOUT = 600 s |
80 | CONNECT_ATTEMPTS = 2 | 77 | CONNECT_ATTEMPTS = 2 |
81 | DEBUG = YES | ||
82 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 78 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
83 | MAX_CONCURRENT_SSH = 10 | 79 | MAX_CONCURRENT_SSH = 10 |
84 | USE_PROGRESSBARS = YES | 80 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh_path.conf b/src/mesh/test_mesh_path.conf index 5ac9710d4..9a9cf3087 100644 --- a/src/mesh/test_mesh_path.conf +++ b/src/mesh/test_mesh_path.conf | |||
@@ -5,7 +5,6 @@ AUTOSTART = NO | |||
5 | AUTOSTART = NO | 5 | AUTOSTART = NO |
6 | 6 | ||
7 | [mesh] | 7 | [mesh] |
8 | DEBUG = YES | ||
9 | AUTOSTART = YES | 8 | AUTOSTART = YES |
10 | ACCEPT_FROM = 127.0.0.1; | 9 | ACCEPT_FROM = 127.0.0.1; |
11 | HOSTNAME = localhost | 10 | HOSTNAME = localhost |
@@ -14,7 +13,6 @@ PORT = 10511 | |||
14 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args | 13 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args |
15 | 14 | ||
16 | [dht] | 15 | [dht] |
17 | DEBUG = NO | ||
18 | AUTOSTART = YES | 16 | AUTOSTART = YES |
19 | ACCEPT_FROM6 = ::1; | 17 | ACCEPT_FROM6 = ::1; |
20 | ACCEPT_FROM = 127.0.0.1; | 18 | ACCEPT_FROM = 127.0.0.1; |
@@ -30,7 +28,6 @@ DATABASE = sqlite | |||
30 | 28 | ||
31 | [transport] | 29 | [transport] |
32 | PLUGINS = tcp | 30 | PLUGINS = tcp |
33 | DEBUG = NO | ||
34 | ACCEPT_FROM6 = ::1; | 31 | ACCEPT_FROM6 = ::1; |
35 | ACCEPT_FROM = 127.0.0.1; | 32 | ACCEPT_FROM = 127.0.0.1; |
36 | NEIGHBOUR_LIMIT = 50 | 33 | NEIGHBOUR_LIMIT = 50 |
@@ -56,7 +53,6 @@ PORT = 12092 | |||
56 | [arm] | 53 | [arm] |
57 | DEFAULTSERVICES = core | 54 | DEFAULTSERVICES = core |
58 | PORT = 12366 | 55 | PORT = 12366 |
59 | DEBUG = NO | ||
60 | 56 | ||
61 | [transport-tcp] | 57 | [transport-tcp] |
62 | TIMEOUT = 300 s | 58 | TIMEOUT = 300 s |
diff --git a/src/mesh/test_mesh_regex.c b/src/mesh/test_mesh_regex.c index 8e65324df..4bb0c8ddf 100644 --- a/src/mesh/test_mesh_regex.c +++ b/src/mesh/test_mesh_regex.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "gnunet_mesh_service.h" | 28 | #include "gnunet_mesh_service.h" |
29 | 29 | ||
30 | #define VERBOSE GNUNET_YES | ||
31 | #define REMOVE_DIR GNUNET_YES | 30 | #define REMOVE_DIR GNUNET_YES |
32 | #define MESH_REGEX_PEERS 4 | 31 | #define MESH_REGEX_PEERS 4 |
33 | 32 | ||
@@ -159,13 +158,11 @@ shutdown_callback (void *cls, const char *emsg) | |||
159 | for (i = 0; i < MESH_REGEX_PEERS; i++) | 158 | for (i = 0; i < MESH_REGEX_PEERS; i++) |
160 | ok[i] = GNUNET_NO; | 159 | ok[i] = GNUNET_NO; |
161 | } | 160 | } |
162 | #if VERBOSE | ||
163 | else | 161 | else |
164 | { | 162 | { |
165 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
166 | "test: All peers successfully shut down!\n"); | 164 | "test: All peers successfully shut down!\n"); |
167 | } | 165 | } |
168 | #endif | ||
169 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 166 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
170 | } | 167 | } |
171 | 168 | ||
@@ -180,9 +177,7 @@ shutdown_callback (void *cls, const char *emsg) | |||
180 | static void | 177 | static void |
181 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 178 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
182 | { | 179 | { |
183 | #if VERBOSE | ||
184 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); | 180 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); |
185 | #endif | ||
186 | shutdown_handle = GNUNET_SCHEDULER_NO_TASK; | 181 | shutdown_handle = GNUNET_SCHEDULER_NO_TASK; |
187 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 182 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
188 | } | 183 | } |
@@ -407,13 +402,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
407 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 402 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
408 | return; | 403 | return; |
409 | } | 404 | } |
410 | #if VERBOSE | 405 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
411 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 406 | "Peer Group started successfully with %u connections\n", |
412 | "test: Peer Group started successfully!\n"); | ||
413 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "test: Have %u connections\n", | ||
414 | total_connections); | 407 | total_connections); |
415 | #endif | ||
416 | |||
417 | peers_running = GNUNET_TESTING_daemons_running (pg); | 408 | peers_running = GNUNET_TESTING_daemons_running (pg); |
418 | if (0 < failed_connections) | 409 | if (0 < failed_connections) |
419 | { | 410 | { |
@@ -519,19 +510,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
519 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 510 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
520 | 511 | ||
521 | GNUNET_log_setup ("test_mesh_regex", | 512 | GNUNET_log_setup ("test_mesh_regex", |
522 | #if VERBOSE | ||
523 | "DEBUG", | ||
524 | #else | ||
525 | "WARNING", | 513 | "WARNING", |
526 | #endif | ||
527 | NULL); | 514 | NULL); |
528 | |||
529 | #if VERBOSE | ||
530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | 515 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); |
531 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
532 | "use_progressbars", "YES"); | ||
533 | #endif | ||
534 | |||
535 | if (GNUNET_OK != | 516 | if (GNUNET_OK != |
536 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 517 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
537 | "num_peers", &num_peers)) | 518 | "num_peers", &num_peers)) |
@@ -574,10 +555,6 @@ main (int argc, char *argv[]) | |||
574 | argv[0], | 555 | argv[0], |
575 | "-c", | 556 | "-c", |
576 | "test_mesh_2dtorus.conf", | 557 | "test_mesh_2dtorus.conf", |
577 | #if VERBOSE | ||
578 | "-L", | ||
579 | "DEBUG", | ||
580 | #endif | ||
581 | NULL | 558 | NULL |
582 | }; | 559 | }; |
583 | int result; | 560 | int result; |
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 3f9e1c2ae..80edad496 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <gauger.h> | 29 | #include <gauger.h> |
30 | 30 | ||
31 | 31 | ||
32 | #define VERBOSE GNUNET_YES | ||
33 | #define REMOVE_DIR GNUNET_YES | 32 | #define REMOVE_DIR GNUNET_YES |
34 | 33 | ||
35 | struct MeshPeer | 34 | struct MeshPeer |
@@ -289,18 +288,14 @@ shutdown_callback (void *cls, const char *emsg) | |||
289 | { | 288 | { |
290 | if (emsg != NULL) | 289 | if (emsg != NULL) |
291 | { | 290 | { |
292 | #if VERBOSE | ||
293 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 291 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
294 | "Shutdown of peers failed!\n"); | 292 | "Shutdown of peers failed!\n"); |
295 | #endif | ||
296 | ok--; | 293 | ok--; |
297 | } | 294 | } |
298 | else | 295 | else |
299 | { | 296 | { |
300 | #if VERBOSE | ||
301 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
302 | "All peers successfully shut down!\n"); | 298 | "All peers successfully shut down!\n"); |
303 | #endif | ||
304 | } | 299 | } |
305 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 300 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
306 | } | 301 | } |
@@ -315,11 +310,8 @@ shutdown_callback (void *cls, const char *emsg) | |||
315 | static void | 310 | static void |
316 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 311 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
317 | { | 312 | { |
318 | #if VERBOSE | ||
319 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 313 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
320 | "Ending test.\n"); | 314 | "Ending test.\n"); |
321 | #endif | ||
322 | |||
323 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 315 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
324 | { | 316 | { |
325 | GNUNET_SCHEDULER_cancel (disconnect_task); | 317 | GNUNET_SCHEDULER_cancel (disconnect_task); |
@@ -877,7 +869,6 @@ connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
877 | } | 869 | } |
878 | app = (GNUNET_MESH_ApplicationType) 0; | 870 | app = (GNUNET_MESH_ApplicationType) 0; |
879 | 871 | ||
880 | #if VERBOSE | ||
881 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 872 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
882 | "connecting to mesh service of peer %s\n", | 873 | "connecting to mesh service of peer %s\n", |
883 | GNUNET_i2s (&d1->id)); | 874 | GNUNET_i2s (&d1->id)); |
@@ -890,7 +881,6 @@ connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
890 | "connecting to mesh service of peer %s\n", | 881 | "connecting to mesh service of peer %s\n", |
891 | GNUNET_i2s (&d3->id)); | 882 | GNUNET_i2s (&d3->id)); |
892 | } | 883 | } |
893 | #endif | ||
894 | h1 = GNUNET_MESH_connect (d1->cfg, (void *) 1L, NULL, &tunnel_cleaner, | 884 | h1 = GNUNET_MESH_connect (d1->cfg, (void *) 1L, NULL, &tunnel_cleaner, |
895 | handlers, &app); | 885 | handlers, &app); |
896 | h2 = GNUNET_MESH_connect (d2->cfg, (void *) 2L, &incoming_tunnel, | 886 | h2 = GNUNET_MESH_connect (d2->cfg, (void *) 2L, &incoming_tunnel, |
@@ -943,16 +933,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
943 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 933 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
944 | return; | 934 | return; |
945 | } | 935 | } |
946 | #if VERBOSE | ||
947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
948 | "************************************************************\n"); | ||
949 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
950 | "Peer Group started successfully!\n"); | ||
951 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 936 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
952 | "Have %u connections\n", | 937 | "Peer Group started successfully with %u connections\n", |
953 | total_connections); | 938 | total_connections); |
954 | #endif | ||
955 | |||
956 | if (data_file != NULL) | 939 | if (data_file != NULL) |
957 | { | 940 | { |
958 | buf = NULL; | 941 | buf = NULL; |
@@ -1041,20 +1024,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1041 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 1024 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
1042 | 1025 | ||
1043 | GNUNET_log_setup ("test_mesh_small", | 1026 | GNUNET_log_setup ("test_mesh_small", |
1044 | #if VERBOSE | ||
1045 | "DEBUG", | ||
1046 | #else | ||
1047 | "WARNING", | 1027 | "WARNING", |
1048 | #endif | ||
1049 | NULL); | 1028 | NULL); |
1050 | 1029 | ||
1051 | #if VERBOSE | ||
1052 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1030 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1053 | "Starting daemons.\n"); | 1031 | "Starting daemons.\n"); |
1054 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
1055 | "use_progressbars", "YES"); | ||
1056 | #endif | ||
1057 | |||
1058 | if (GNUNET_OK != | 1032 | if (GNUNET_OK != |
1059 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 1033 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
1060 | "num_peers", &num_peers)) | 1034 | "num_peers", &num_peers)) |
@@ -1152,10 +1126,6 @@ main (int argc, char *argv[]) | |||
1152 | argv[0], | 1126 | argv[0], |
1153 | "-c", | 1127 | "-c", |
1154 | "test_mesh_small.conf", | 1128 | "test_mesh_small.conf", |
1155 | #if VERBOSE | ||
1156 | "-L", | ||
1157 | "DEBUG", | ||
1158 | #endif | ||
1159 | NULL | 1129 | NULL |
1160 | }; | 1130 | }; |
1161 | int argc2 = (sizeof (argv2) / sizeof (char *)) - 1; | 1131 | int argc2 = (sizeof (argv2) / sizeof (char *)) - 1; |
@@ -1193,9 +1163,6 @@ main (int argc, char *argv[]) | |||
1193 | test_name = "speed ack"; | 1163 | test_name = "speed ack"; |
1194 | ok_goal = TOTAL_PACKETS * 2 + 3; | 1164 | ok_goal = TOTAL_PACKETS * 2 + 3; |
1195 | argv2 [3] = NULL; // remove -L DEBUG | 1165 | argv2 [3] = NULL; // remove -L DEBUG |
1196 | #if VERBOSE | ||
1197 | argc2 -= 2; | ||
1198 | #endif | ||
1199 | } | 1166 | } |
1200 | else if (strstr (argv[0], "test_mesh_small_speed") != NULL) | 1167 | else if (strstr (argv[0], "test_mesh_small_speed") != NULL) |
1201 | { | 1168 | { |
diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf index 2277a9a76..4083e8e79 100644 --- a/src/mesh/test_mesh_small.conf +++ b/src/mesh/test_mesh_small.conf | |||
@@ -3,7 +3,6 @@ SERVICEHOME = /tmp/test_mesh_small/ | |||
3 | 3 | ||
4 | [mesh] | 4 | [mesh] |
5 | PORT = 10005 | 5 | PORT = 10005 |
6 | DEBUG = YES | ||
7 | ACCEPT_FROM = 127.0.0.1; | 6 | ACCEPT_FROM = 127.0.0.1; |
8 | HOSTNAME = localhost | 7 | HOSTNAME = localhost |
9 | REFRESH_PATH_TIME = 5 s | 8 | REFRESH_PATH_TIME = 5 s |
@@ -19,14 +18,12 @@ DHT_REPLICAITON_LEVEL = 10 | |||
19 | [arm] | 18 | [arm] |
20 | PORT = 10010 | 19 | PORT = 10010 |
21 | DEFAULTSERVICES = core dht mesh | 20 | DEFAULTSERVICES = core dht mesh |
22 | #DEBUG = YES | ||
23 | 21 | ||
24 | [statistics] | 22 | [statistics] |
25 | AUTOSTART = YES | 23 | AUTOSTART = YES |
26 | PORT = 10000 | 24 | PORT = 10000 |
27 | 25 | ||
28 | [dht] | 26 | [dht] |
29 | DEBUG = NO | ||
30 | AUTOSTART = YES | 27 | AUTOSTART = YES |
31 | ACCEPT_FROM6 = ::1; | 28 | ACCEPT_FROM6 = ::1; |
32 | ACCEPT_FROM = 127.0.0.1; | 29 | ACCEPT_FROM = 127.0.0.1; |
@@ -90,7 +87,6 @@ BLACKLIST_TRANSPORTS = tcp udp http unix | |||
90 | F2F = NO | 87 | F2F = NO |
91 | CONNECT_TIMEOUT = 660 s | 88 | CONNECT_TIMEOUT = 660 s |
92 | CONNECT_ATTEMPTS = 2 | 89 | CONNECT_ATTEMPTS = 2 |
93 | DEBUG = YES | ||
94 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 90 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
95 | MAX_CONCURRENT_SSH = 10 | 91 | MAX_CONCURRENT_SSH = 10 |
96 | USE_PROGRESSBARS = YES | 92 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh_tree_api.c b/src/mesh/test_mesh_tree_api.c index 1d43135e4..60b88239c 100644 --- a/src/mesh/test_mesh_tree_api.c +++ b/src/mesh/test_mesh_tree_api.c | |||
@@ -35,12 +35,10 @@ | |||
35 | #define MESH_TUNNEL_TREE_C | 35 | #define MESH_TUNNEL_TREE_C |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define VERBOSE 1 | 38 | static int failed; |
39 | 39 | static int cb_call; | |
40 | int failed; | 40 | static struct GNUNET_PeerIdentity *pi[10]; |
41 | int cb_call; | 41 | static struct MeshTunnelTree *tree; |
42 | struct GNUNET_PeerIdentity *pi[10]; | ||
43 | struct MeshTunnelTree *tree; | ||
44 | 42 | ||
45 | static void | 43 | static void |
46 | cb (void *cls, GNUNET_PEER_Id peer_id) | 44 | cb (void *cls, GNUNET_PEER_Id peer_id) |
@@ -155,11 +153,7 @@ main (int argc, char *argv[]) | |||
155 | failed = 0; | 153 | failed = 0; |
156 | cb_call = 0; | 154 | cb_call = 0; |
157 | GNUNET_log_setup ("test_mesh_api_tree", | 155 | GNUNET_log_setup ("test_mesh_api_tree", |
158 | #if VERBOSE | ||
159 | "DEBUG", | ||
160 | #else | ||
161 | "WARNING", | 156 | "WARNING", |
162 | #endif | ||
163 | NULL); | 157 | NULL); |
164 | for (i = 0; i < 10; i++) | 158 | for (i = 0; i < 10; i++) |
165 | { | 159 | { |