aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-regex-profiler.c1
-rw-r--r--src/mesh/regex_profiler_test.conf3
-rw-r--r--src/mesh/test_mesh.conf4
-rw-r--r--src/mesh/test_mesh_2dtorus.c28
-rw-r--r--src/mesh/test_mesh_2dtorus.conf4
-rw-r--r--src/mesh/test_mesh_path.conf4
-rw-r--r--src/mesh/test_mesh_regex.c27
-rw-r--r--src/mesh/test_mesh_small.c35
-rw-r--r--src/mesh/test_mesh_small.conf4
-rw-r--r--src/mesh/test_mesh_tree_api.c14
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]
27DEFAULTSERVICES = core mesh dht statistics 27DEFAULTSERVICES = core mesh dht statistics
28PORT = 12003 28PORT = 12003
29DEBUG = NO
30 29
31[fs] 30[fs]
32AUTOSTART = NO 31AUTOSTART = NO
@@ -40,7 +39,6 @@ plugins = dht mesh
40[transport] 39[transport]
41AUTOSTART = YES 40AUTOSTART = YES
42PLUGINS = tcp 41PLUGINS = tcp
43DEBUG = NO
44ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; 42ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24;
45ACCEPT_FROM6 = ::1; 43ACCEPT_FROM6 = ::1;
46NEIGHBOUR_LIMIT = 50 44NEIGHBOUR_LIMIT = 50
@@ -67,7 +65,6 @@ ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24;
67[TESTING] 65[TESTING]
68NUM_PEERS = 5 66NUM_PEERS = 5
69WEAKRANDOM = YES 67WEAKRANDOM = YES
70DEBUG = YES
71HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat 68HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
72MAX_CONCURRENT_SSH = 10 69MAX_CONCURRENT_SSH = 10
73USE_PROGRESSBARS = YES 70USE_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
5AUTOSTART = NO 5AUTOSTART = NO
6 6
7[mesh] 7[mesh]
8DEBUG = YES
9AUTOSTART = YES 8AUTOSTART = YES
10ACCEPT_FROM = 127.0.0.1; 9ACCEPT_FROM = 127.0.0.1;
11HOSTNAME = localhost 10HOSTNAME = localhost
@@ -27,7 +26,6 @@ AUTOSTART = NO
27PORT = 10012 26PORT = 10012
28 27
29[dht] 28[dht]
30DEBUG = NO
31AUTOSTART = YES 29AUTOSTART = YES
32ACCEPT_FROM6 = ::1; 30ACCEPT_FROM6 = ::1;
33ACCEPT_FROM = 127.0.0.1; 31ACCEPT_FROM = 127.0.0.1;
@@ -43,7 +41,6 @@ DATABASE = sqlite
43 41
44[transport] 42[transport]
45PLUGINS = tcp 43PLUGINS = tcp
46DEBUG = NO
47ACCEPT_FROM6 = ::1; 44ACCEPT_FROM6 = ::1;
48ACCEPT_FROM = 127.0.0.1; 45ACCEPT_FROM = 127.0.0.1;
49NEIGHBOUR_LIMIT = 50 46NEIGHBOUR_LIMIT = 50
@@ -59,7 +56,6 @@ PORT = 12092
59[arm] 56[arm]
60DEFAULTSERVICES = core 57DEFAULTSERVICES = core
61PORT = 12366 58PORT = 12366
62DEBUG = NO
63 59
64[transport-tcp] 60[transport-tcp]
65TIMEOUT = 300 s 61TIMEOUT = 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)
121static void 118static void
122shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 119shutdown_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]
5PORT = 10010 5PORT = 10010
6DEFAULTSERVICES = core dht mesh 6DEFAULTSERVICES = core dht mesh
7#DEBUG = YES
8 7
9[statistics] 8[statistics]
10AUTOSTART = YES 9AUTOSTART = YES
11PORT = 10000 10PORT = 10000
12 11
13[dht] 12[dht]
14DEBUG = NO
15AUTOSTART = YES 13AUTOSTART = YES
16ACCEPT_FROM6 = ::1; 14ACCEPT_FROM6 = ::1;
17ACCEPT_FROM = 127.0.0.1; 15ACCEPT_FROM = 127.0.0.1;
@@ -53,7 +51,6 @@ PORT = 10004
53 51
54[mesh] 52[mesh]
55PORT = 10005 53PORT = 10005
56DEBUG=YES
57ACCEPT_FROM = 127.0.0.1; 54ACCEPT_FROM = 127.0.0.1;
58HOSTNAME = localhost 55HOSTNAME = localhost
59# PREFIX = valgrind --leak-check=full 56# PREFIX = valgrind --leak-check=full
@@ -78,7 +75,6 @@ CONNECT_TOPOLOGY = 2D_TORUS
78F2F = NO 75F2F = NO
79CONNECT_TIMEOUT = 600 s 76CONNECT_TIMEOUT = 600 s
80CONNECT_ATTEMPTS = 2 77CONNECT_ATTEMPTS = 2
81DEBUG = YES
82HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat 78HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
83MAX_CONCURRENT_SSH = 10 79MAX_CONCURRENT_SSH = 10
84USE_PROGRESSBARS = YES 80USE_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
5AUTOSTART = NO 5AUTOSTART = NO
6 6
7[mesh] 7[mesh]
8DEBUG = YES
9AUTOSTART = YES 8AUTOSTART = YES
10ACCEPT_FROM = 127.0.0.1; 9ACCEPT_FROM = 127.0.0.1;
11HOSTNAME = localhost 10HOSTNAME = 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]
17DEBUG = NO
18AUTOSTART = YES 16AUTOSTART = YES
19ACCEPT_FROM6 = ::1; 17ACCEPT_FROM6 = ::1;
20ACCEPT_FROM = 127.0.0.1; 18ACCEPT_FROM = 127.0.0.1;
@@ -30,7 +28,6 @@ DATABASE = sqlite
30 28
31[transport] 29[transport]
32PLUGINS = tcp 30PLUGINS = tcp
33DEBUG = NO
34ACCEPT_FROM6 = ::1; 31ACCEPT_FROM6 = ::1;
35ACCEPT_FROM = 127.0.0.1; 32ACCEPT_FROM = 127.0.0.1;
36NEIGHBOUR_LIMIT = 50 33NEIGHBOUR_LIMIT = 50
@@ -56,7 +53,6 @@ PORT = 12092
56[arm] 53[arm]
57DEFAULTSERVICES = core 54DEFAULTSERVICES = core
58PORT = 12366 55PORT = 12366
59DEBUG = NO
60 56
61[transport-tcp] 57[transport-tcp]
62TIMEOUT = 300 s 58TIMEOUT = 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)
180static void 177static void
181shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 178shutdown_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
35struct MeshPeer 34struct 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)
315static void 310static void
316shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 311shutdown_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]
5PORT = 10005 5PORT = 10005
6DEBUG = YES
7ACCEPT_FROM = 127.0.0.1; 6ACCEPT_FROM = 127.0.0.1;
8HOSTNAME = localhost 7HOSTNAME = localhost
9REFRESH_PATH_TIME = 5 s 8REFRESH_PATH_TIME = 5 s
@@ -19,14 +18,12 @@ DHT_REPLICAITON_LEVEL = 10
19[arm] 18[arm]
20PORT = 10010 19PORT = 10010
21DEFAULTSERVICES = core dht mesh 20DEFAULTSERVICES = core dht mesh
22#DEBUG = YES
23 21
24[statistics] 22[statistics]
25AUTOSTART = YES 23AUTOSTART = YES
26PORT = 10000 24PORT = 10000
27 25
28[dht] 26[dht]
29DEBUG = NO
30AUTOSTART = YES 27AUTOSTART = YES
31ACCEPT_FROM6 = ::1; 28ACCEPT_FROM6 = ::1;
32ACCEPT_FROM = 127.0.0.1; 29ACCEPT_FROM = 127.0.0.1;
@@ -90,7 +87,6 @@ BLACKLIST_TRANSPORTS = tcp udp http unix
90F2F = NO 87F2F = NO
91CONNECT_TIMEOUT = 660 s 88CONNECT_TIMEOUT = 660 s
92CONNECT_ATTEMPTS = 2 89CONNECT_ATTEMPTS = 2
93DEBUG = YES
94HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat 90HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
95MAX_CONCURRENT_SSH = 10 91MAX_CONCURRENT_SSH = 10
96USE_PROGRESSBARS = YES 92USE_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 38static int failed;
39 39static int cb_call;
40int failed; 40static struct GNUNET_PeerIdentity *pi[10];
41int cb_call; 41static struct MeshTunnelTree *tree;
42struct GNUNET_PeerIdentity *pi[10];
43struct MeshTunnelTree *tree;
44 42
45static void 43static void
46cb (void *cls, GNUNET_PEER_Id peer_id) 44cb (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 {