aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-06-17 16:59:24 +0000
committerNathan S. Evans <evans@in.tum.de>2010-06-17 16:59:24 +0000
commitba0d06c004c19720b3ef999f2a0a2de10182c7ba (patch)
treee04b9db55dfe293621e9fb0fa40f8663c9327941 /src
parent96e9d119d82102f01d246a8d8852bd8181915bec (diff)
downloadgnunet-ba0d06c004c19720b3ef999f2a0a2de10182c7ba.tar.gz
gnunet-ba0d06c004c19720b3ef999f2a0a2de10182c7ba.zip
clean up files
Diffstat (limited to 'src')
-rw-r--r--src/dv/Makefile.am15
-rw-r--r--src/dv/test_dv_topology.c753
-rw-r--r--src/dv/test_transport_api_data.conf125
-rw-r--r--src/dv/test_transport_api_dv_peer1.conf118
-rw-r--r--src/dv/test_transport_api_dv_peer2.conf118
-rw-r--r--src/dv/test_transport_api_dv_peer3.conf118
-rw-r--r--src/dv/test_transport_api_dv_peer4.conf117
-rw-r--r--src/dv/test_transport_dv_data.conf (renamed from src/dv/test_dv_topology.conf)34
8 files changed, 20 insertions, 1378 deletions
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am
index 99a3e6114..14dd18c1c 100644
--- a/src/dv/Makefile.am
+++ b/src/dv/Makefile.am
@@ -62,18 +62,5 @@ test_transport_api_dv_LDADD = \
62 $(top_builddir)/src/util/libgnunetutil.la \ 62 $(top_builddir)/src/util/libgnunetutil.la \
63 $(top_builddir)/src/testing/libgnunettesting.la 63 $(top_builddir)/src/testing/libgnunettesting.la
64 64
65#test_dv_topology_SOURCES = \
66# test_dv_topology.c
67#test_dv_topology_LDADD = \
68# $(top_builddir)/src/transport/libgnunettransport.la \
69# $(top_builddir)/src/util/libgnunetutil.la \
70# $(top_builddir)/src/testing/libgnunettesting.la
71
72
73EXTRA_DIST = \ 65EXTRA_DIST = \
74 test_transport_dv_data.conf \ 66 test_transport_dv_data.conf
75 test_transport_api_dv_peer1.conf \
76 test_transport_api_dv_peer2.conf \
77 test_transport_api_dv_peer3.conf
78
79
diff --git a/src/dv/test_dv_topology.c b/src/dv/test_dv_topology.c
deleted file mode 100644
index 06f4b09ea..000000000
--- a/src/dv/test_dv_topology.c
+++ /dev/null
@@ -1,753 +0,0 @@
1/*
2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20/**
21 * @file testing/test_testing_topology.c
22 * @brief base testcase for testing all the topologies provided
23 */
24#include "platform.h"
25#include "gnunet_testing_lib.h"
26#include "gnunet_core_service.h"
27
28#define VERBOSE GNUNET_YES
29
30/**
31 * How long until we fail the whole testcase?
32 */
33#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 600)
34
35/**
36 * How long until we give up on connecting the peers?
37 */
38#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
39
40#define DEFAULT_NUM_PEERS 4
41
42#define MAX_OUTSTANDING_CONNECTIONS 300
43
44static float fail_percentage = 0.05;
45
46static int ok;
47
48static unsigned long long num_peers;
49
50static unsigned int total_connections;
51
52static unsigned int failed_connections;
53
54static unsigned int total_server_connections;
55
56static unsigned int total_messages_received;
57
58static unsigned int expected_messages;
59
60static unsigned int expected_connections;
61
62static unsigned long long peers_left;
63
64static struct GNUNET_TESTING_PeerGroup *pg;
65
66static struct GNUNET_SCHEDULER_Handle *sched;
67
68const struct GNUNET_CONFIGURATION_Handle *main_cfg;
69
70GNUNET_SCHEDULER_TaskIdentifier die_task;
71
72static char *dotOutFileName;
73
74static FILE *dotOutFile;
75
76static char *topology_string;
77
78static int transmit_ready_scheduled;
79
80static int transmit_ready_failed;
81
82static int transmit_ready_called;
83
84static enum GNUNET_TESTING_Topology topology;
85
86static char *test_directory;
87
88#define MTYPE 12345
89
90struct GNUNET_TestMessage
91{
92 /**
93 * Header of the message
94 */
95 struct GNUNET_MessageHeader header;
96
97 /**
98 * Unique identifier for this message.
99 */
100 uint32_t uid;
101};
102
103struct TestMessageContext
104{
105 /* This is a linked list */
106 struct TestMessageContext *next;
107
108 /* Handle to the sending peer core */
109 struct GNUNET_CORE_Handle *peer1handle;
110
111 /* Handle to the receiving peer core */
112 struct GNUNET_CORE_Handle *peer2handle;
113
114 /* Handle to the sending peer daemon */
115 struct GNUNET_TESTING_Daemon *peer1;
116
117 /* Handle to the receiving peer daemon */
118 struct GNUNET_TESTING_Daemon *peer2;
119
120 /* Identifier for this message, so we don't disconnect other peers! */
121 uint32_t uid;
122
123 /* Task for disconnecting cores, allow task to be cancelled on shutdown */
124 GNUNET_SCHEDULER_TaskIdentifier disconnect_task;
125
126};
127
128static struct TestMessageContext *test_messages;
129
130static void
131finish_testing ()
132{
133 GNUNET_assert (pg != NULL);
134 struct TestMessageContext *pos;
135 struct TestMessageContext *free_pos;
136#if VERBOSE
137 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
138 "Called finish testing, stopping daemons.\n");
139#endif
140 int count;
141 count = 0;
142 pos = test_messages;
143 while (pos != NULL)
144 {
145 if (pos->peer1handle != NULL)
146 {
147 GNUNET_CORE_disconnect(pos->peer1handle);
148 pos->peer1handle = NULL;
149 }
150 if (pos->peer2handle != NULL)
151 {
152 GNUNET_CORE_disconnect(pos->peer2handle);
153 pos->peer2handle = NULL;
154 }
155 free_pos = pos;
156 pos = pos->next;
157 if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK)
158 {
159 GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task);
160 }
161 GNUNET_free(free_pos);
162 }
163#if VERBOSE
164 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
165 "transmit_ready's scheduled %d, failed %d, transmit_ready's called %d\n", transmit_ready_scheduled, transmit_ready_failed, transmit_ready_called);
166#endif
167 sleep(1);
168#if VERBOSE
169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
170 "Calling daemons_stop\n");
171#endif
172 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
173#if VERBOSE
174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
175 "daemons_stop finished\n");
176#endif
177 if (dotOutFile != NULL)
178 {
179 fprintf(dotOutFile, "}");
180 fclose(dotOutFile);
181 }
182
183 ok = 0;
184}
185
186
187static void
188disconnect_cores (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
189{
190 struct TestMessageContext *pos = cls;
191
192 /* Disconnect from the respective cores */
193#if VERBOSE
194 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
195 "Disconnecting from peer 1 `%4s'\n", GNUNET_i2s (&pos->peer1->id));
196#endif
197 if (pos->peer1handle != NULL)
198 GNUNET_CORE_disconnect(pos->peer1handle);
199#if VERBOSE
200 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
201 "Disconnecting from peer 2 `%4s'\n", GNUNET_i2s (&pos->peer2->id));
202#endif
203 if (pos->peer2handle != NULL)
204 GNUNET_CORE_disconnect(pos->peer2handle);
205 /* Set handles to NULL so test case can be ended properly */
206 pos->peer1handle = NULL;
207 pos->peer2handle = NULL;
208 pos->disconnect_task = GNUNET_SCHEDULER_NO_TASK;
209 /* Decrement total connections so new can be established */
210 total_server_connections -= 2;
211}
212
213static int
214process_mtype (void *cls,
215 const struct GNUNET_PeerIdentity *peer,
216 const struct GNUNET_MessageHeader *message,
217 struct GNUNET_TIME_Relative latency,
218 uint32_t distance)
219{
220 struct TestMessageContext *pos = cls;
221 struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *)message;
222
223 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
224 "Received message from `%4s', type %d, distance %u.\n", GNUNET_i2s (peer), ntohs(message->type), distance);
225 if (pos->uid != ntohl(msg->uid))
226 return GNUNET_OK;
227
228 total_messages_received++;
229#if VERBOSE
230 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
231 "Received message from `%4s', type %d, distance %u.\n", GNUNET_i2s (peer), ntohs(message->type), distance);
232 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
233 "Total messages received %d, expected %d.\n", total_messages_received, expected_messages);
234#endif
235
236 if (total_messages_received == expected_messages)
237 {
238 GNUNET_SCHEDULER_cancel (sched, die_task);
239 GNUNET_SCHEDULER_add_now (sched, &finish_testing, NULL);
240 }
241 else
242 {
243 pos->disconnect_task = GNUNET_SCHEDULER_add_now(sched, &disconnect_cores, pos);
244 }
245
246 return GNUNET_OK;
247}
248
249static void
250end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
251{
252 char *msg = cls;
253 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
254 "End badly was called (%s)... stopping daemons.\n", msg);
255 struct TestMessageContext *pos;
256 struct TestMessageContext *free_pos;
257
258 pos = test_messages;
259 while (pos != NULL)
260 {
261 if (pos->peer1handle != NULL)
262 {
263 GNUNET_CORE_disconnect(pos->peer1handle);
264 pos->peer1handle = NULL;
265 }
266 if (pos->peer2handle != NULL)
267 {
268 GNUNET_CORE_disconnect(pos->peer2handle);
269 pos->peer2handle = NULL;
270 }
271 free_pos = pos;
272 pos = pos->next;
273 GNUNET_free(free_pos);
274 }
275
276 if (pg != NULL)
277 {
278 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
279 ok = 7331; /* Opposite of leet */
280 }
281 else
282 ok = 401; /* Never got peers started */
283
284 if (dotOutFile != NULL)
285 {
286 fprintf(dotOutFile, "}");
287 fclose(dotOutFile);
288 }
289}
290
291
292
293static size_t
294transmit_ready (void *cls, size_t size, void *buf)
295{
296 struct GNUNET_TestMessage *m;
297 struct TestMessageContext *pos = cls;
298
299 GNUNET_assert (buf != NULL);
300 m = (struct GNUNET_TestMessage *) buf;
301 m->header.type = htons (MTYPE);
302 m->header.size = htons (sizeof (struct GNUNET_TestMessage));
303 m->uid = htonl(pos->uid);
304 transmit_ready_called++;
305#if VERBOSE
306 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
307 "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", GNUNET_i2s(&pos->peer1->id), transmit_ready_scheduled, transmit_ready_called);
308#endif
309 return sizeof (struct GNUNET_TestMessage);
310}
311
312
313static struct GNUNET_CORE_MessageHandler no_handlers[] = {
314 {NULL, 0, 0}
315};
316
317static struct GNUNET_CORE_MessageHandler handlers[] = {
318 {&process_mtype, MTYPE, sizeof (struct GNUNET_TestMessage)},
319 {NULL, 0, 0}
320};
321
322static void
323init_notify_peer2 (void *cls,
324 struct GNUNET_CORE_Handle *server,
325 const struct GNUNET_PeerIdentity *my_identity,
326 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
327{
328 struct TestMessageContext *pos = cls;
329
330#if VERBOSE
331 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
332 "Core connection to `%4s' established, scheduling message send\n",
333 GNUNET_i2s (my_identity));
334#endif
335 total_server_connections++;
336
337 if (NULL == GNUNET_CORE_notify_transmit_ready (pos->peer1handle,
338 0,
339 TIMEOUT,
340 &pos->peer2->id,
341 sizeof (struct GNUNET_TestMessage),
342 &transmit_ready, pos))
343 {
344 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
345 "RECEIVED NULL when asking core (1) for transmission to peer `%4s'\n",
346 GNUNET_i2s (&pos->peer2->id));
347 transmit_ready_failed++;
348 }
349 else
350 {
351 transmit_ready_scheduled++;
352 }
353}
354
355
356static void
357init_notify_peer1 (void *cls,
358 struct GNUNET_CORE_Handle *server,
359 const struct GNUNET_PeerIdentity *my_identity,
360 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
361{
362 struct TestMessageContext *pos = cls;
363 total_server_connections++;
364
365#if VERBOSE
366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
367 "Core connection to `%4s' established, setting up handles\n",
368 GNUNET_i2s (my_identity));
369#endif
370
371 /*
372 * Connect to the receiving peer
373 */
374 pos->peer2handle = GNUNET_CORE_connect (sched,
375 pos->peer2->cfg,
376 TIMEOUT,
377 pos,
378 &init_notify_peer2,
379 NULL,
380 NULL,
381 NULL,
382 GNUNET_YES, NULL, GNUNET_YES, handlers);
383
384}
385
386
387static void
388send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
389{
390 struct TestMessageContext *pos = cls;
391
392 if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL))
393 return;
394
395 if (die_task == GNUNET_SCHEDULER_NO_TASK)
396 {
397 die_task = GNUNET_SCHEDULER_add_delayed (sched,
398 TEST_TIMEOUT,
399 &end_badly, "from send_test_messages (timeout)");
400 }
401
402 if (total_server_connections >= MAX_OUTSTANDING_CONNECTIONS)
403 {
404 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1),
405 &send_test_messages, pos);
406 return; /* Otherwise we'll double schedule messages here! */
407 }
408
409 /*
410 * Connect to the sending peer
411 */
412 pos->peer1handle = GNUNET_CORE_connect (sched,
413 pos->peer1->cfg,
414 TIMEOUT,
415 pos,
416 &init_notify_peer1,
417 NULL,
418 NULL,
419 NULL,
420 GNUNET_NO, NULL, GNUNET_NO, no_handlers);
421
422 GNUNET_assert(pos->peer1handle != NULL);
423
424 if (total_server_connections < MAX_OUTSTANDING_CONNECTIONS)
425 {
426 GNUNET_SCHEDULER_add_now (sched,
427 &send_test_messages, pos->next);
428 }
429 else
430 {
431 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1),
432 &send_test_messages, pos->next);
433 }
434}
435
436
437static void
438schedule_dv_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
439{
440 struct TestMessageContext *pos;
441 struct TestMessageContext *new_message;
442 struct TestMessageContext *last;
443 struct TestMessageContext *new_list;
444 int i;
445 int other;
446
447 if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN)
448 return;
449
450 pos = test_messages;
451 last = NULL;
452 while (pos != NULL)
453 {
454 last = pos;
455 pos = pos->next;
456 }
457
458 new_list = NULL;
459 for (i = 0; i < num_peers; i++)
460 {
461 new_message = GNUNET_malloc(sizeof(struct TestMessageContext));
462 other = i + 2;
463 if (other >= num_peers)
464 other = other - num_peers;
465 new_message->peer1 = GNUNET_TESTING_daemon_get(pg, i);
466 new_message->peer2 = GNUNET_TESTING_daemon_get(pg, other);
467
468 new_message->uid = total_connections + i + 1;
469 new_message->next = new_list;
470#if VERBOSE
471 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
472 "Scheduled message between `%4s' and `%4s'\n",
473 new_message->peer1->shortname, new_message->peer2->shortname);
474#endif
475
476 new_list = new_message;
477 expected_messages++;
478 }
479
480 if (dotOutFile != NULL)
481 {
482 fprintf(dotOutFile, "}");
483 fclose (dotOutFile);
484 dotOutFile = NULL;
485 }
486
487 if (last != NULL)
488 last->next = new_list;
489 else
490 test_messages = new_list;
491
492 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1), &send_test_messages, test_messages);
493}
494
495
496void
497topology_callback (void *cls,
498 const struct GNUNET_PeerIdentity *first,
499 const struct GNUNET_PeerIdentity *second,
500 const struct GNUNET_CONFIGURATION_Handle *first_cfg,
501 const struct GNUNET_CONFIGURATION_Handle *second_cfg,
502 struct GNUNET_TESTING_Daemon *first_daemon,
503 struct GNUNET_TESTING_Daemon *second_daemon,
504 const char *emsg)
505{
506 //struct TestMessageContext *temp_context;
507 if (emsg == NULL)
508 {
509 total_connections++;
510#if VERBOSE
511 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connected peer %s to peer %s\n",
512 first_daemon->shortname,
513 second_daemon->shortname);
514#endif
515 /*temp_context = GNUNET_malloc(sizeof(struct TestMessageContext));
516 temp_context->peer1 = first_daemon;
517 temp_context->peer2 = second_daemon;
518 temp_context->next = test_messages;
519 temp_context->uid = total_connections;
520 temp_context->disconnect_task = GNUNET_SCHEDULER_NO_TASK;
521 test_messages = temp_context;
522
523 expected_messages++;*/
524 if (dotOutFile != NULL)
525 fprintf(dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, second_daemon->shortname);
526 }
527#if VERBOSE
528 else
529 {
530 failed_connections++;
531 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to connect peer %s to peer %s with error :\n%s\n",
532 first_daemon->shortname,
533 second_daemon->shortname, emsg);
534 }
535#endif
536
537 if (total_connections == expected_connections)
538 {
539#if VERBOSE
540 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
541 "Created %d total connections, which is our target number! Calling send messages.\n",
542 total_connections);
543#endif
544
545 GNUNET_SCHEDULER_cancel (sched, die_task);
546 die_task = GNUNET_SCHEDULER_NO_TASK;
547 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1), &schedule_dv_messages, test_messages);
548 }
549 else if (total_connections + failed_connections == expected_connections)
550 {
551 if (failed_connections < (unsigned int)(fail_percentage * total_connections))
552 {
553 GNUNET_SCHEDULER_cancel (sched, die_task);
554 die_task = GNUNET_SCHEDULER_NO_TASK;
555 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1), &schedule_dv_messages, test_messages);
556 }
557 else
558 {
559 GNUNET_SCHEDULER_cancel (sched, die_task);
560 die_task = GNUNET_SCHEDULER_add_now (sched,
561 &end_badly, "from topology_callback (too many failed connections)");
562 }
563 }
564 else
565 {
566#if VERBOSE
567 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
568 "Have %d total connections, %d failed connections, Want %d (at least %d)\n",
569 total_connections, failed_connections, expected_connections, expected_connections - (unsigned int)(fail_percentage * expected_connections));
570#endif
571 }
572}
573
574
575static void
576create_topology ()
577{
578 expected_connections = -1;
579 if ((pg != NULL) && (peers_left == 0))
580 {
581 /* create_topology will read the topology information from
582 the config already contained in the peer group, so should
583 we have create_topology called from start peers? I think
584 maybe this way is best so that the client can know both
585 when peers are started, and when they are connected.
586 */
587 expected_connections = GNUNET_TESTING_create_topology (pg, topology, GNUNET_TESTING_TOPOLOGY_NONE, "");
588#if VERBOSE
589 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
590 "Have %d expected connections\n", expected_connections);
591#endif
592 }
593
594 GNUNET_SCHEDULER_cancel (sched, die_task);
595 if (expected_connections == GNUNET_SYSERR)
596 {
597 die_task = GNUNET_SCHEDULER_add_now (sched,
598 &end_badly, "from create topology (bad return)");
599 }
600 die_task = GNUNET_SCHEDULER_add_delayed (sched,
601 TEST_TIMEOUT,
602 &end_badly, "from create topology (timeout)");
603}
604
605
606static void
607my_cb (void *cls,
608 const struct GNUNET_PeerIdentity *id,
609 const struct GNUNET_CONFIGURATION_Handle *cfg,
610 struct GNUNET_TESTING_Daemon *d, const char *emsg)
611{
612 GNUNET_assert (id != NULL);
613#if VERBOSE
614 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n",
615 (num_peers - peers_left) + 1, num_peers);
616#endif
617 peers_left--;
618 if (peers_left == 0)
619 {
620#if VERBOSE
621 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
622 "All %d daemons started, now creating topology!\n",
623 num_peers);
624#endif
625 GNUNET_SCHEDULER_cancel (sched, die_task);
626 /* Set up task in case topology creation doesn't finish
627 * within a reasonable amount of time */
628 die_task = GNUNET_SCHEDULER_add_delayed (sched,
629 GNUNET_TIME_relative_multiply
630 (GNUNET_TIME_UNIT_MINUTES, 5),
631 &end_badly, "from my_cb");
632 create_topology ();
633 ok = 0;
634 }
635}
636
637
638static void
639run (void *cls,
640 struct GNUNET_SCHEDULER_Handle *s,
641 char *const *args,
642 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
643{
644 unsigned long long topology_num;
645 sched = s;
646 ok = 1;
647
648 dotOutFileName = strdup("topology.dot");
649 dotOutFile = fopen (dotOutFileName, "w");
650 if (dotOutFile != NULL)
651 {
652 fprintf (dotOutFile, "strict graph G {\n");
653 }
654
655#if VERBOSE
656 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
657 "Starting daemons based on config file %s\n", cfgfile);
658#endif
659
660 if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string(cfg, "paths", "servicehome", &test_directory))
661 {
662 ok = 404;
663 return;
664 }
665
666 if (GNUNET_YES ==
667 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "topology",
668 &topology_num))
669 topology = topology_num;
670
671 if (GNUNET_SYSERR ==
672 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",
673 &num_peers))
674 num_peers = DEFAULT_NUM_PEERS;
675
676 main_cfg = cfg;
677
678 peers_left = num_peers;
679
680 /* Set up a task to end testing if peer start fails */
681 die_task = GNUNET_SCHEDULER_add_delayed (sched,
682 GNUNET_TIME_relative_multiply
683 (GNUNET_TIME_UNIT_MINUTES, 5),
684 &end_badly, "didn't start all daemons in reasonable amount of time!!!");
685
686 pg = GNUNET_TESTING_daemons_start (sched, cfg,
687 peers_left,
688 TIMEOUT,
689 NULL, NULL,
690 &my_cb, NULL,
691 &topology_callback, NULL, NULL);
692
693}
694
695static int
696check ()
697{
698 char *binary_name;
699 char *config_file_name;
700 GNUNET_asprintf(&binary_name, "test-dv-topology", topology_string);
701 GNUNET_asprintf(&config_file_name, "test_dv_topology.conf", topology_string);
702
703 int ret;
704 char *const argv[] = {binary_name,
705 "-c",
706 config_file_name,
707#if VERBOSE
708 "-L", "DEBUG",
709#endif
710 NULL
711 };
712 struct GNUNET_GETOPT_CommandLineOption options[] = {
713 GNUNET_GETOPT_OPTION_END
714 };
715 ret = GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
716 argv, binary_name, "nohelp",
717 options, &run, &ok);
718 if (ret != GNUNET_OK)
719 {
720 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "`test-dv-topology': Failed with error code %d\n", ret);
721 }
722 GNUNET_free(binary_name);
723 GNUNET_free(config_file_name);
724 return ok;
725}
726
727int
728main (int argc, char *argv[])
729{
730 int ret;
731
732 GNUNET_log_setup ("test-dv-topology",
733#if VERBOSE
734 "DEBUG",
735#else
736 "WARNING",
737#endif
738 NULL);
739 ret = check ();
740
741 /**
742 * Need to remove base directory, subdirectories taken care
743 * of by the testing framework.
744 */
745 if (GNUNET_DISK_directory_remove (test_directory) != GNUNET_OK)
746 {
747 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Failed to remove testing directory %s\n", test_directory);
748 }
749
750 return ret;
751}
752
753/* end of test_testing_group.c */
diff --git a/src/dv/test_transport_api_data.conf b/src/dv/test_transport_api_data.conf
deleted file mode 100644
index a04dc536d..000000000
--- a/src/dv/test_transport_api_data.conf
+++ /dev/null
@@ -1,125 +0,0 @@
1[PATHS]
2SERVICEHOME = /tmp/test-transport-api/
3DEFAULTCONFIG = test_transport_api_data.conf
4
5[transport-tcp]
6PORT = 2094
7
8[fs]
9ACCEPT_FROM6 = ::1;
10ACCEPT_FROM = 127.0.0.1;
11BINARY = gnunet-service-fs
12CONFIG = $DEFAULTCONFIG
13HOME = $SERVICEHOME
14HOSTNAME = localhost
15PORT = 2094
16INDEXDB = $SERVICEHOME/idxinfo.lst
17
18[datastore-sqlite]
19FILENAME = $SERVICEHOME/datastore/sqlite.db
20
21[datastore]
22DATABASE = sqlite
23BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
24QUOTA = 100000000
25ACCEPT_FROM6 = ::1;
26ACCEPT_FROM = 127.0.0.1;
27BINARY = gnunet-service-datastore
28CONFIG = $DEFAULTCONFIG
29HOME = $SERVICEHOME
30HOSTNAME = localhost
31PORT = 2093
32
33[hostlist]
34HTTP-PROXY =
35SERVERS = http://gnunet.org:8080/
36OPTIONS = -b
37BINARY = gnunet-daemon-hostlist
38CONFIG = $DEFAULTCONFIG
39HOME = $SERVICEHOME
40HOSTNAME = localhost
41HTTPPORT = 8080
42
43[topology]
44BINARY = gnunet-daemon-topology
45CONFIG = $DEFAULTCONFIG
46FRIENDS = $SERVICEHOME/friends
47TARGET-CONNECTION-COUNT = 16
48AUTOCONNECT = YES
49FRIENDS-ONLY = NO
50MINIMUM-FRIENDS = 0
51
52[core]
53TOTAL_QUOTA_OUT = 3932160
54TOTAL_QUOTA_IN = 3932160
55ACCEPT_FROM6 = ::1;
56ACCEPT_FROM = 127.0.0.1;
57BINARY = gnunet-service-core
58CONFIG = $DEFAULTCONFIG
59HOME = $SERVICEHOME
60HOSTNAME = localhost
61PORT = 2092
62DEBUG = YES
63
64[transport]
65plugins = tcp
66DEBUG = NO
67PREFIX =
68ACCEPT_FROM6 = ::1;
69ACCEPT_FROM = 127.0.0.1;
70NEIGHBOUR_LIMIT = 50
71BINARY = gnunet-service-transport
72CONFIG = $DEFAULTCONFIG
73HOME = $SERVICEHOME
74HOSTNAME = localhost
75PORT = 2091
76
77[peerinfo]
78TRUST = $SERVICEHOME/data/credit/
79HOSTS = $SERVICEHOME/data/hosts/
80ACCEPT_FROM6 = ::1;
81ACCEPT_FROM = 127.0.0.1;
82BINARY = gnunet-service-peerinfo
83CONFIG = $DEFAULTCONFIG
84HOME = $SERVICEHOME
85HOSTNAME = localhost
86PORT = 2090
87
88[resolver]
89ACCEPT_FROM6 = ::1;
90ACCEPT_FROM = 127.0.0.1;
91BINARY = gnunet-service-resolver
92CONFIG = $DEFAULTCONFIG
93HOME = $SERVICEHOME
94HOSTNAME = localhost
95PORT = 2089
96
97[statistics]
98ACCEPT_FROM6 = ::1;
99ACCEPT_FROM = 127.0.0.1;
100BINARY = gnunet-service-statistics
101CONFIG = $DEFAULTCONFIG
102HOME = $SERVICEHOME
103HOSTNAME = localhost
104PORT = 2088
105
106[arm]
107DEFAULTSERVICES =
108ACCEPT_FROM6 = ::1;
109ACCEPT_FROM = 127.0.0.1;
110BINARY = gnunet-service-arm
111CONFIG = $DEFAULTCONFIG
112HOME = $SERVICEHOME
113HOSTNAME = localhost
114PORT = 2087
115
116[transport-tcp]
117TIMEOUT = 300000
118PORT = 2094
119
120[TESTING]
121WEAKRANDOM = NO
122
123[gnunetd]
124HOSTKEY = $SERVICEHOME/.hostkey
125
diff --git a/src/dv/test_transport_api_dv_peer1.conf b/src/dv/test_transport_api_dv_peer1.conf
deleted file mode 100644
index af53414d4..000000000
--- a/src/dv/test_transport_api_dv_peer1.conf
+++ /dev/null
@@ -1,118 +0,0 @@
1[hostlist]
2HTTP-PROXY =
3SERVERS = http://gnunet.org:8080/
4OPTIONS = -b
5BINARY = gnunet-daemon-hostlist
6CONFIG = $DEFAULTCONFIG
7HOME = $SERVICEHOME
8HOSTNAME = localhost
9HTTPPORT = 8080
10
11[topology]
12BINARY = gnunet-daemon-topology
13CONFIG = $DEFAULTCONFIG
14FRIENDS = $SERVICEHOME/friends
15TARGET-CONNECTION-COUNT = 16
16AUTOCONNECT = YES
17FRIENDS-ONLY = NO
18MINIMUM-FRIENDS = 0
19
20[transport]
21PLUGINS = tcp dv
22DEBUG = NO
23#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
24#PREFIX = valgrind --leak-check=full
25#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
26ACCEPT_FROM6 = ::1;
27ACCEPT_FROM = 127.0.0.1;
28NEIGHBOUR_LIMIT = 50
29BINARY = gnunet-service-transport
30CONFIG = $DEFAULTCONFIG
31HOME = $SERVICEHOME
32HOSTNAME = localhost
33PORT = 12365
34BLACKLIST_FILE = $SERVICEHOME/blacklist
35UNIXPATH = /tmp/gnunet-p1-service-transport.sock
36
37[peerinfo]
38TRUST = $SERVICEHOME/data/credit/
39HOSTS = $SERVICEHOME/data/hosts/
40ACCEPT_FROM6 = ::1;
41ACCEPT_FROM = 127.0.0.1;
42BINARY = gnunet-service-peerinfo
43CONFIG = $DEFAULTCONFIG
44HOME = $SERVICEHOME
45HOSTNAME = localhost
46PORT = 12369
47UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
48
49[resolver]
50ACCEPT_FROM6 = ::1;
51ACCEPT_FROM = 127.0.0.1;
52BINARY = gnunet-service-resolver
53CONFIG = $DEFAULTCONFIG
54HOME = $SERVICEHOME
55HOSTNAME = localhost
56PORT = 12364
57UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
58
59[statistics]
60ACCEPT_FROM6 = ::1;
61ACCEPT_FROM = 127.0.0.1;
62BINARY = gnunet-service-statistics
63CONFIG = $DEFAULTCONFIG
64HOME = $SERVICEHOME
65HOSTNAME = localhost
66PORT = 12367
67UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
68
69[dv]
70DEBUG = NO
71ACCEPT_FROM6 = ::1;
72ACCEPT_FROM = 127.0.0.1;
73#BINARY = gnunet-service-dv
74BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
75#PREFIX = xterm -T dvservice -e gdb --args
76#PREFIX = valgrind --log-file=dv1-%p --leak-check=full
77CONFIG = $DEFAULTCONFIG
78HOME = $SERVICEHOME
79HOSTNAME = localhost
80PORT = 12370
81
82[core]
83TOTAL_QUOTA_OUT = 3932160
84TOTAL_QUOTA_IN = 3932160
85ACCEPT_FROM6 = ::1;
86ACCEPT_FROM = 127.0.0.1;
87BINARY = gnunet-service-core
88CONFIG = $DEFAULTCONFIG
89HOME = $SERVICEHOME
90HOSTNAME = localhost
91PORT = 12092
92UNIXPATH = /tmp/gnunet-p1-service-core.sock
93
94[arm]
95DEFAULTSERVICES =
96ACCEPT_FROM6 = ::1;
97ACCEPT_FROM = 127.0.0.1;
98BINARY = gnunet-service-arm
99CONFIG = $DEFAULTCONFIG
100HOME = $SERVICEHOME
101HOSTNAME = localhost
102PORT = 12366
103UNIXPATH = /tmp/gnunet-p1-service-arm.sock
104
105[transport-tcp]
106TIMEOUT = 300000
107PORT = 12368
108
109[TESTING]
110WEAKRANDOM = YES
111
112[gnunetd]
113HOSTKEY = $SERVICEHOME/.hostkey
114
115[PATHS]
116DEFAULTCONFIG = test_transport_api_dv_peer1.conf
117SERVICEHOME = /tmp/test-gnunetd-transport-peer-1/
118
diff --git a/src/dv/test_transport_api_dv_peer2.conf b/src/dv/test_transport_api_dv_peer2.conf
deleted file mode 100644
index 515f6340b..000000000
--- a/src/dv/test_transport_api_dv_peer2.conf
+++ /dev/null
@@ -1,118 +0,0 @@
1[core]
2TOTAL_QUOTA_OUT = 3932160
3TOTAL_QUOTA_IN = 3932160
4ACCEPT_FROM6 = ::1;
5ACCEPT_FROM = 127.0.0.1;
6BINARY = gnunet-service-core
7CONFIG = $DEFAULTCONFIG
8HOME = $SERVICEHOME
9HOSTNAME = localhost
10PORT = 22092
11
12[hostlist]
13HTTP-PROXY =
14SERVERS = http://gnunet.org:8080/
15OPTIONS = -b
16BINARY = gnunet-daemon-hostlist
17CONFIG = $DEFAULTCONFIG
18HOME = $SERVICEHOME
19HOSTNAME = localhost
20HTTPPORT = 8080
21
22[topology]
23BINARY = gnunet-daemon-topology
24CONFIG = $DEFAULTCONFIG
25FRIENDS = $SERVICEHOME/friends
26TARGET-CONNECTION-COUNT = 16
27AUTOCONNECT = YES
28FRIENDS-ONLY = NO
29MINIMUM-FRIENDS = 0
30
31[transport]
32PLUGINS = tcp dv
33DEBUG = NO
34# PREFIX =
35ACCEPT_FROM6 = ::1;
36ACCEPT_FROM = 127.0.0.1;
37NEIGHBOUR_LIMIT = 50
38#BINARY = gnunet-service-transport
39#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
40CONFIG = $DEFAULTCONFIG
41HOME = $SERVICEHOME
42HOSTNAME = localhost
43PORT = 22365
44#PREFIX = xterm -T transport1 -e gdb --command=cmd --args
45#PREFIX = valgrind --leak-check=full
46BLACKLIST_FILE = $SERVICEHOME/blacklist
47UNIXPATH = /tmp/gnunet-p2-service-transport.sock
48
49[peerinfo]
50TRUST = $SERVICEHOME/data/credit/
51HOSTS = $SERVICEHOME/data/hosts/
52ACCEPT_FROM6 = ::1;
53ACCEPT_FROM = 127.0.0.1;
54BINARY = gnunet-service-peerinfo
55CONFIG = $DEFAULTCONFIG
56HOME = $SERVICEHOME
57HOSTNAME = localhost
58PORT = 22369
59UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
60
61[resolver]
62ACCEPT_FROM6 = ::1;
63ACCEPT_FROM = 127.0.0.1;
64BINARY = gnunet-service-resolver
65CONFIG = $DEFAULTCONFIG
66HOME = $SERVICEHOME
67HOSTNAME = localhost
68PORT = 22364
69UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
70
71[statistics]
72ACCEPT_FROM6 = ::1;
73ACCEPT_FROM = 127.0.0.1;
74BINARY = gnunet-service-statistics
75CONFIG = $DEFAULTCONFIG
76HOME = $SERVICEHOME
77HOSTNAME = localhost
78PORT = 22367
79UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
80
81[dv]
82DEBUG = NO
83ACCEPT_FROM6 = ::1;
84ACCEPT_FROM = 127.0.0.1;
85#BINARY = gnunet-service-dv
86BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
87#PREFIX = xterm -T dvservice2 -e gdb --args
88#PREFIX = valgrind --log-file=dv2-%p --leak-check=full
89CONFIG = $DEFAULTCONFIG
90HOME = $SERVICEHOME
91HOSTNAME = localhost
92PORT = 22370
93
94[arm]
95DEFAULTSERVICES =
96ACCEPT_FROM6 = ::1;
97ACCEPT_FROM = 127.0.0.1;
98BINARY = gnunet-service-arm
99CONFIG = $DEFAULTCONFIG
100HOME = $SERVICEHOME
101HOSTNAME = localhost
102PORT = 22366
103UNIXPATH = /tmp/gnunet-p2-service-arm.sock
104
105[transport-tcp]
106TIMEOUT = 300000
107PORT = 22368
108
109[TESTING]
110WEAKRANDOM = YES
111
112[gnunetd]
113HOSTKEY = $SERVICEHOME/.hostkey
114
115[PATHS]
116DEFAULTCONFIG = test_transport_api_dv_peer2.conf
117SERVICEHOME = /tmp/test-gnunetd-transport-peer-2/
118
diff --git a/src/dv/test_transport_api_dv_peer3.conf b/src/dv/test_transport_api_dv_peer3.conf
deleted file mode 100644
index be9d7fd2d..000000000
--- a/src/dv/test_transport_api_dv_peer3.conf
+++ /dev/null
@@ -1,118 +0,0 @@
1[hostlist]
2HTTP-PROXY =
3SERVERS = http://gnunet.org:8080/
4OPTIONS = -b
5BINARY = gnunet-daemon-hostlist
6CONFIG = $DEFAULTCONFIG
7HOME = $SERVICEHOME
8HOSTNAME = localhost
9HTTPPORT = 8080
10
11[topology]
12BINARY = gnunet-daemon-topology
13CONFIG = $DEFAULTCONFIG
14FRIENDS = $SERVICEHOME/friends
15TARGET-CONNECTION-COUNT = 16
16AUTOCONNECT = YES
17FRIENDS-ONLY = NO
18MINIMUM-FRIENDS = 0
19
20[transport]
21PLUGINS = tcp dv
22DEBUG = NO
23ACCEPT_FROM6 = ::1;
24ACCEPT_FROM = 127.0.0.1;
25NEIGHBOUR_LIMIT = 50
26#BINARY = /root/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
27BINARY = gnunet-service-transport
28#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
29CONFIG = $DEFAULTCONFIG
30HOME = $SERVICEHOME
31HOSTNAME = localhost
32PORT = 32365
33#PREFIX = xterm -T transport1 -e gdb --args
34#PREFIX = valgrind --leak-check=full
35BLACKLIST_FILE = $SERVICEHOME/blacklist
36UNIXPATH = /tmp/gnunet-p3-service-transport.sock
37
38[peerinfo]
39TRUST = $SERVICEHOME/data/credit/
40HOSTS = $SERVICEHOME/data/hosts/
41ACCEPT_FROM6 = ::1;
42ACCEPT_FROM = 127.0.0.1;
43BINARY = gnunet-service-peerinfo
44CONFIG = $DEFAULTCONFIG
45HOME = $SERVICEHOME
46HOSTNAME = localhost
47PORT = 32369
48
49[resolver]
50ACCEPT_FROM6 = ::1;
51ACCEPT_FROM = 127.0.0.1;
52BINARY = gnunet-service-resolver
53CONFIG = $DEFAULTCONFIG
54HOME = $SERVICEHOME
55HOSTNAME = localhost
56PORT = 32364
57UNIXPATH = /tmp/gnunet-p3-service-resolver.sock
58
59[core]
60TOTAL_QUOTA_OUT = 3932160
61TOTAL_QUOTA_IN = 3932160
62ACCEPT_FROM6 = ::1;
63ACCEPT_FROM = 127.0.0.1;
64BINARY = gnunet-service-core
65CONFIG = $DEFAULTCONFIG
66HOME = $SERVICEHOME
67HOSTNAME = localhost
68PORT = 32092
69UNIXPATH = /tmp/gnunet-p3-service-core.sock
70
71[statistics]
72ACCEPT_FROM6 = ::1;
73ACCEPT_FROM = 127.0.0.1;
74BINARY = gnunet-service-statistics
75CONFIG = $DEFAULTCONFIG
76HOME = $SERVICEHOME
77HOSTNAME = localhost
78PORT = 32367
79UNIXPATH = /tmp/gnunet-p3-service-statistics.sock
80
81[dv]
82DEBUG = YES
83ACCEPT_FROM6 = ::1;
84ACCEPT_FROM = 127.0.0.1;
85BINARY = gnunet-service-dv
86BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
87#PREFIX = xterm -T dvservice3 -e gdb --args
88#PREFIX = valgrind --log-file=dv3-%p --leak-check=full --show-reachable=yes
89CONFIG = $DEFAULTCONFIG
90HOME = $SERVICEHOME
91HOSTNAME = localhost
92PORT = 32370
93
94[arm]
95DEFAULTSERVICES =
96ACCEPT_FROM6 = ::1;
97ACCEPT_FROM = 127.0.0.1;
98BINARY = gnunet-service-arm
99CONFIG = $DEFAULTCONFIG
100HOME = $SERVICEHOME
101HOSTNAME = localhost
102PORT = 32366
103UNIXPATH = /tmp/gnunet-p3-service-arm.sock
104
105[transport-tcp]
106TIMEOUT = 300000
107PORT = 32368
108
109[TESTING]
110WEAKRANDOM = YES
111
112[gnunetd]
113HOSTKEY = $SERVICEHOME/.hostkey
114
115[PATHS]
116DEFAULTCONFIG = test_transport_api_dv_peer3.conf
117SERVICEHOME = /tmp/test-gnunetd-transport-peer-3/
118
diff --git a/src/dv/test_transport_api_dv_peer4.conf b/src/dv/test_transport_api_dv_peer4.conf
deleted file mode 100644
index c051de030..000000000
--- a/src/dv/test_transport_api_dv_peer4.conf
+++ /dev/null
@@ -1,117 +0,0 @@
1[topology]
2BINARY = gnunet-daemon-topology
3CONFIG = $DEFAULTCONFIG
4FRIENDS = $SERVICEHOME/friends
5TARGET-CONNECTION-COUNT = 16
6AUTOCONNECT = YES
7FRIENDS-ONLY = NO
8MINIMUM-FRIENDS = 0
9
10[transport]
11PLUGINS = tcp dv
12DEBUG = NO
13ALLOW_SHUTDOWN = YES
14ACCEPT_FROM6 = ::1;
15ACCEPT_FROM = 127.0.0.1;
16NEIGHBOUR_LIMIT = 50
17#BINARY = /root/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
18BINARY = gnunet-service-transport
19#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
20CONFIG = $DEFAULTCONFIG
21HOME = $SERVICEHOME
22HOSTNAME = localhost
23PORT = 42365
24#PREFIX = xterm -T transport1 -e gdb --args
25#PREFIX = valgrind --leak-check=full
26BLACKLIST_FILE = $SERVICEHOME/blacklist
27UNIXPATH = /tmp/gnunet-p4-service-transport.sock
28
29[peerinfo]
30TRUST = $SERVICEHOME/data/credit/
31HOSTS = $SERVICEHOME/data/hosts/
32ALLOW_SHUTDOWN = YES
33ACCEPT_FROM6 = ::1;
34ACCEPT_FROM = 127.0.0.1;
35BINARY = gnunet-service-peerinfo
36CONFIG = $DEFAULTCONFIG
37HOME = $SERVICEHOME
38HOSTNAME = localhost
39PORT = 42369
40UNIXPATH = /tmp/gnunet-p4-service-peerinfo.sock
41
42[resolver]
43ALLOW_SHUTDOWN = YES
44ACCEPT_FROM6 = ::1;
45ACCEPT_FROM = 127.0.0.1;
46BINARY = gnunet-service-resolver
47CONFIG = $DEFAULTCONFIG
48HOME = $SERVICEHOME
49HOSTNAME = localhost
50PORT = 42364
51UNIXPATH = /tmp/gnunet-p4-service-resolver.sock
52
53[core]
54TOTAL_QUOTA_OUT = 3932160
55TOTAL_QUOTA_IN = 3932160
56ALLOW_SHUTDOWN = YES
57ACCEPT_FROM6 = ::1;
58ACCEPT_FROM = 127.0.0.1;
59BINARY = gnunet-service-core
60CONFIG = $DEFAULTCONFIG
61HOME = $SERVICEHOME
62HOSTNAME = localhost
63PORT = 42092
64UNIXPATH = /tmp/gnunet-p4-service-core.sock
65
66[statistics]
67ALLOW_SHUTDOWN = YES
68ACCEPT_FROM6 = ::1;
69ACCEPT_FROM = 127.0.0.1;
70BINARY = gnunet-service-statistics
71CONFIG = $DEFAULTCONFIG
72HOME = $SERVICEHOME
73HOSTNAME = localhost
74PORT = 42367
75UNIXPATH = /tmp/gnunet-p4-service-statistics.sock
76
77[dv]
78DEBUG = NO
79ALLOW_SHUTDOWN = YES
80ACCEPT_FROM6 = ::1;
81ACCEPT_FROM = 127.0.0.1;
82BINARY = gnunet-service-dv
83#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
84#PREFIX = xterm -T dvservice4 -e gdb --args
85#PREFIX = valgrind --log-file=dv4-%p --leak-check=full --show-reachable=yes
86CONFIG = $DEFAULTCONFIG
87HOME = $SERVICEHOME
88HOSTNAME = localhost
89PORT = 42370
90
91[arm]
92DEFAULTSERVICES =
93ALLOW_SHUTDOWN = YES
94ACCEPT_FROM6 = ::1;
95ACCEPT_FROM = 127.0.0.1;
96BINARY = gnunet-service-arm
97CONFIG = $DEFAULTCONFIG
98HOME = $SERVICEHOME
99HOSTNAME = localhost
100PORT = 42366
101UNIXPATH = /tmp/gnunet-p4-service-arm.sock
102
103[transport-tcp]
104ALLOW_SHUTDOWN = NO
105TIMEOUT = 300000
106PORT = 42368
107
108[TESTING]
109WEAKRANDOM = YES
110
111[gnunetd]
112HOSTKEY = $SERVICEHOME/.hostkey
113
114[PATHS]
115DEFAULTCONFIG = test_transport_api_dv_peer4.conf
116SERVICEHOME = /tmp/test-gnunetd-transport-peer-4/
117
diff --git a/src/dv/test_dv_topology.conf b/src/dv/test_transport_dv_data.conf
index 4eeee8fe2..848f9170a 100644
--- a/src/dv/test_dv_topology.conf
+++ b/src/dv/test_transport_dv_data.conf
@@ -1,21 +1,15 @@
1[PATHS] 1[PATHS]
2SERVICEHOME = /tmp/test-gnunet-dv/ 2SERVICEHOME = /tmp/test-gnunet-dv-testing/
3DEFAULTCONFIG = test_dv_topology.conf 3DEFAULTCONFIG = test_transport_dv_data.conf
4 4
5[resolver] 5[resolver]
6PORT = 2564 6PORT = 2564
7 7
8[topology]
9BINARY = gnunet-daemon-topology
10CONFIG = $DEFAULTCONFIG
11FRIENDS = $SERVICEHOME/friends
12AUTOCONNECT = YES
13FRIENDS-ONLY = YES
14
15
16[transport] 8[transport]
9DEBUG = NO
17PORT = 2565 10PORT = 2565
18PLUGINS = tcp dv 11PLUGINS = tcp dv
12BLACKLIST_FILE = $SERVICEHOME/blacklist
19#PREFIX = xterm -e xterm -T transport -e gdb --args 13#PREFIX = xterm -e xterm -T transport -e gdb --args
20#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport 14#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
21#PREFIX = valgrind --tool=memcheck --log-file=logs%p 15#PREFIX = valgrind --tool=memcheck --log-file=logs%p
@@ -23,7 +17,7 @@ PLUGINS = tcp dv
23 17
24[arm] 18[arm]
25PORT = 2566 19PORT = 2566
26DEFAULTSERVICES = topology core dv statistics 20DEFAULTSERVICES =
27 21
28[statistics] 22[statistics]
29PORT = 2567 23PORT = 2567
@@ -48,21 +42,31 @@ PORT = 2570
48#DEBUG = YES 42#DEBUG = YES
49 43
50[dv] 44[dv]
45AUTOSTART = YES
51DEBUG = NO 46DEBUG = NO
52ALLOW_SHUTDOWN = YES
53ACCEPT_FROM6 = ::1; 47ACCEPT_FROM6 = ::1;
54ACCEPT_FROM = 127.0.0.1; 48ACCEPT_FROM = 127.0.0.1;
55BINARY = gnunet-service-dv 49BINARY = gnunet-service-dv
50#BINARY = /root/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
56#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv 51#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv
57#PREFIX = xterm -T dvservice -e gdb --args 52#PREFIX = xterm -T dvservice -e gdb --args
58#PREFIX = valgrind --log-file=dv1-%p --leak-check=full 53#PREFIX = valgrind --log-file=dv-%p --leak-check=full
59CONFIG = $DEFAULTCONFIG 54CONFIG = $DEFAULTCONFIG
60HOME = $SERVICEHOME 55HOME = $SERVICEHOME
61HOSTNAME = localhost 56HOSTNAME = localhost
62PORT = 2571 57PORT = 2571
63 58
64[testing] 59[testing]
65NUM_PEERS = 6 60NUM_PEERS = 5
61DEBUG = YES
66WEAKRANDOM = YES 62WEAKRANDOM = YES
67TOPOLOGY = 3 63TOPOLOGY = CLIQUE
64CONNECT_TOPOLOGY = RING
65BLACKLIST_TOPOLOGY = RING
66BLACKLIST_TRANSPORTS = tcp
68F2F = YES 67F2F = YES
68
69[fs]
70AUTOSTART = NO
71
72