add support for multi topology testing to makefile (all work for me, but only clique...
authorNathan S. Evans <evans@in.tum.de>
Fri, 26 Feb 2010 10:58:00 +0000 (10:58 +0000)
committerNathan S. Evans <evans@in.tum.de>
Fri, 26 Feb 2010 10:58:00 +0000 (10:58 +0000)
src/testing/Makefile.am
src/testing/test_testing_data_topology_2d_torus.conf [new file with mode: 0644]
src/testing/test_testing_data_topology_clique.conf
src/testing/test_testing_data_topology_erdos_renyi.conf [new file with mode: 0644]
src/testing/test_testing_data_topology_internat.conf [new file with mode: 0644]
src/testing/test_testing_data_topology_ring.conf [new file with mode: 0644]
src/testing/test_testing_data_topology_small_world_ring.conf [new file with mode: 0644]
src/testing/test_testing_data_topology_small_world_torus.conf [new file with mode: 0644]
src/testing/test_testing_topology.c

index 8b1dceb15058e44e7a550732fce835eeacac16e5..ebe777b0f3325270363ebb46718db3f93dbefd40 100644 (file)
@@ -26,12 +26,24 @@ check_PROGRAMS = \
  test_testing_connect \
  test_testing_group \
  test_testing_topology_clique
-
+# test_testing_topology_ring \
+# test_testing_topology_2d_torus \
+# test_testing_topology_small_world_ring \
+# test_testing_topology_small_world_torus \
+# test_testing_topology_erdos_renyi \
+# test_testing_topology_internat
 TESTS = \
  test_testing \
  test_testing_connect \
  test_testing_group \
- test_testing_topology_clique
+ test_testing_topology_clique 
+# test_testing_topology_ring \
+# test_testing_topology_2d_torus \
+# test_testing_topology_small_world_ring \
+# test_testing_topology_small_world_torus \
+# test_testing_topology_erdos_renyi \
+# test_testing_topology_internat
 #$(check_PROGRAMS)
 
 test_testing_SOURCES = \
@@ -53,13 +65,57 @@ test_testing_group_LDADD = \
  $(top_builddir)/src/util/libgnunetutil.la  
  
 test_testing_topology_clique_SOURCES = \
- test_testing_topology_clique.c
+ test_testing_topology.c
 test_testing_topology_clique_LDADD = \
  $(top_builddir)/src/testing/libgnunettesting.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
+#test_testing_topology_ring_SOURCES = \
+# test_testing_topology.c
+#test_testing_topology_ring_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la  
+#test_testing_topology_2d_torus_SOURCES = \
+#  test_testing_topology.c
+#test_testing_topology_2d_torus_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la 
+#test_testing_topology_small_world_ring_SOURCES = \
+#  test_testing_topology.c
+#test_testing_topology_small_world_ring_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la
+#test_testing_topology_small_world_torus_SOURCES = \
+#  test_testing_topology.c
+#test_testing_topology_small_world_torus_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la
+#test_testing_topology_internat_SOURCES = \
+#  test_testing_topology.c
+#test_testing_topology_internat_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la
+
+#test_testing_topology_erdos_renyi_SOURCES = \
+#  test_testing_topology.c
+#test_testing_topology_erdos_renyi_LDADD = \
+# $(top_builddir)/src/testing/libgnunettesting.la \
+# $(top_builddir)/src/util/libgnunetutil.la
 EXTRA_DIST = \
  test_testing_data.conf \
  test_testing_connect_peer1.conf \
  test_testing_connect_peer2.conf \
- test_testing_data_topology_clique.conf
+ test_testing_data_topology_clique.conf \
+ test_testing_data_topology_ring.conf \
+ test_testing_data_topology_2d_torus.conf \
+ test_testing_data_topology_small_world_ring.conf \
+ test_testing_data_topology_small_world_torus.conf \
+ test_testing_data_topology_erdos_renyi.conf \
+ test_testing_data_topology_internat.conf
diff --git a/src/testing/test_testing_data_topology_2d_torus.conf b/src/testing/test_testing_data_topology_2d_torus.conf
new file mode 100644 (file)
index 0000000..8e8642b
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 4
+F2F = YES
index 6f9a7739ef8876cab8865ce6edcecaacb5a7409b..2a8934c347fbb7486086a481836c66a969f2fc7d 100644 (file)
@@ -30,7 +30,7 @@ PORT = 2570
 #DEBUG = YES
 
 [testing]
-NUM_PEERS = 2
+NUM_PEERS = 5
 WEAKRANDOM = YES
 TOPOLOGY = 0
 F2F = YES
diff --git a/src/testing/test_testing_data_topology_erdos_renyi.conf b/src/testing/test_testing_data_topology_erdos_renyi.conf
new file mode 100644 (file)
index 0000000..a505c4d
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 5
+F2F = YES
diff --git a/src/testing/test_testing_data_topology_internat.conf b/src/testing/test_testing_data_topology_internat.conf
new file mode 100644 (file)
index 0000000..89c0cdf
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 6
+F2F = YES
diff --git a/src/testing/test_testing_data_topology_ring.conf b/src/testing/test_testing_data_topology_ring.conf
new file mode 100644 (file)
index 0000000..4149388
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 3
+F2F = YES
diff --git a/src/testing/test_testing_data_topology_small_world_ring.conf b/src/testing/test_testing_data_topology_small_world_ring.conf
new file mode 100644 (file)
index 0000000..f97723f
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 2
+F2F = YES
diff --git a/src/testing/test_testing_data_topology_small_world_torus.conf b/src/testing/test_testing_data_topology_small_world_torus.conf
new file mode 100644 (file)
index 0000000..0da71f8
--- /dev/null
@@ -0,0 +1,36 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-testing/
+DEFAULTCONFIG = test_testing_data_topology_clique.conf
+
+[resolver]
+PORT = 2564
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+#PREFIX = xterm -e xterm -T transport -e gdb --args
+#PREFIX = valgrind --tool=memcheck --log-file=logs%p
+#DEBUG = YES
+
+[arm]
+PORT = 2566
+DEFAULTSERVICES = peerinfo transport core
+
+[statistics]
+PORT = 2567
+
+[transport-tcp]
+PORT = 2568
+
+[peerinfo]
+PORT = 2569
+
+[core]
+PORT = 2570
+#DEBUG = YES
+
+[testing]
+NUM_PEERS = 5
+WEAKRANDOM = YES
+TOPOLOGY = 1
+F2F = YES
index a8d1a4a8cef5b7c59b256df7bab86864cab779fe..a0438f7bebbd3aedba25c0a7ee3fddb886f6333c 100644 (file)
@@ -25,7 +25,7 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
 
 /**
  * How long until we give up on connecting the peers?
@@ -250,7 +250,9 @@ static size_t
 transmit_ready (void *cls, size_t size, void *buf)
 {
   struct GNUNET_MessageHeader *m;
+#if VERBOSE
   struct GNUNET_PeerIdentity *peer = cls;
+#endif
   GNUNET_assert (buf != NULL);
   m = (struct GNUNET_MessageHeader *) buf;
   m->type = htons (MTYPE);
@@ -258,8 +260,8 @@ transmit_ready (void *cls, size_t size, void *buf)
 
   transmit_ready_called++;
 #if VERBOSE
-          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                      "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", GNUNET_i2s(peer), transmit_ready_scheduled, transmit_ready_called);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", GNUNET_i2s(peer), transmit_ready_scheduled, transmit_ready_called);
 #endif
   GNUNET_SCHEDULER_add_now(sched, &schedule_transmission, NULL);
   return sizeof (struct GNUNET_MessageHeader);