From 61a51d59b76d8c0ab20e06314e7c2581a2b595a1 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 12 Nov 2012 16:55:33 +0000 Subject: [PATCH] test case for ring topology --- src/testbed/Makefile.am | 12 ++- ..._testbed_api_testbed_run_topologyring.conf | 80 +++++++++++++++++++ src/testbed/testbed_api_testbed.c | 5 ++ 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 src/testbed/test_testbed_api_testbed_run_topologyring.conf diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index fc189052c..9eee7cf4e 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am @@ -93,7 +93,8 @@ check_PROGRAMS = \ test_testbed_api_topology_clique \ test_testbed_api_testbed_run_topologyrandom \ test_testbed_api_testbed_run_topologyline \ - test_testbed_api_testbed_run_topologyclique + test_testbed_api_testbed_run_topologyclique \ + test_testbed_api_testbed_run_topologyring if ENABLE_TEST_RUN TESTS = \ @@ -110,7 +111,8 @@ if ENABLE_TEST_RUN test_testbed_api_topology_clique \ test_testbed_api_testbed_run_topologyrandom \ test_testbed_api_testbed_run_topologyline \ - test_testbed_api_testbed_run_topologyclique + test_testbed_api_testbed_run_topologyclique \ + test_testbed_api_testbed_run_topologyring endif test_testbed_api_hosts_SOURCES = \ @@ -202,9 +204,15 @@ test_testbed_api_testbed_run_topologyclique_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ libgnunettestbed.la +test_testbed_api_testbed_run_topologyring_SOURCES = \ + test_testbed_api_testbed_run.c +test_testbed_api_testbed_run_topologyring_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la \ + libgnunettestbed.la EXTRA_DIST = \ test_testbed_api.conf \ + test_testbed_api_testbed_run_topologyring.conf \ test_testbed_api_testbed_run_topologyclique.conf \ test_testbed_api_testbed_run_topologyline.conf \ test_testbed_api_testbed_run_topologyrandom.conf \ diff --git a/src/testbed/test_testbed_api_testbed_run_topologyring.conf b/src/testbed/test_testbed_api_testbed_run_topologyring.conf new file mode 100644 index 000000000..ade5df346 --- /dev/null +++ b/src/testbed/test_testbed_api_testbed_run_topologyring.conf @@ -0,0 +1,80 @@ +[testbed] +AUTOSTART = NO +PORT = 12113 +ACCEPT_FROM = 127.0.0.1; +HOSTNAME = localhost +NEIGHBOUR_LIMIT = 100 +MAX_PARALLEL_OVERLAY_CONNECT_OPERATIONS = 10 +OVERLAY_TOPOLOGY = RING +#PREFIX = xterm -geometry 100x85 -T peer1 -e libtool --mode=execute gdb --args + +[fs] +AUTOSTART = NO + +[resolver] +AUTOSTART = NO + +[mesh] +AUTOSTART = NO + +[dht] +AUTOSTART = NO + +[block] +plugins = dht test + +[dhtcache] +QUOTA = 1 MB +DATABASE = sqlite + +[transport] +PLUGINS = tcp +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +NEIGHBOUR_LIMIT = 50 +PORT = 12365 + +[ats] +WAN_QUOTA_OUT = 3932160 +WAN_QUOTA_IN = 3932160 + +[core] +PORT = 12092 +AUTOSTART = YES + +[arm] +DEFAULTSERVICES = core transport +PORT = 12366 + +[transport-tcp] +TIMEOUT = 300 s +PORT = 12368 + +[TESTING] +NUM_PEERS = 5 +WEAKRANDOM = YES +HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +MAX_CONCURRENT_SSH = 10 +USE_PROGRESSBARS = YES +PEERGROUP_TIMEOUT = 2400 s + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + +[PATHS] +SERVICEHOME = /tmp/test-testbed/ + +[dns] +AUTOSTART = NO + +[nse] +AUTOSTART = NO + +[vpn] +AUTOSTART = NO + +[nat] +RETURN_LOCAL_ADDRESSES = YES + +[gns-helper-service-w32] +AUTOSTART = NO \ No newline at end of file diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index f7f2a9c29..6da0b1075 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c @@ -662,6 +662,11 @@ GNUNET_TESTBED_run (const char *host_filename, rc->topology = GNUNET_TESTBED_TOPOLOGY_LINE; rc->num_oc = num_peers - 1; } + else if (0 == strcasecmp (topology, "RING")) + { + rc->topology = GNUNET_TESTBED_TOPOLOGY_RING; + rc->num_oc = num_peers; + } else LOG (GNUNET_ERROR_TYPE_WARNING, "Unknown topology %s given in configuration\n", topology); -- 2.25.1