aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-24 14:05:58 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-24 14:05:58 +0000
commit71c68d0bbdb546bfe84b4536b447899c53cb3812 (patch)
treecbde440932f0b8c038a6559f880a9ecb0de719d9 /src
parent7093450cf4d9e0654a128aaff442fc6f6809326e (diff)
move testbed logger to its own directory
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/nse/Makefile.am4
-rw-r--r--src/testbed-logger/Makefile.am57
-rw-r--r--src/testbed-logger/gnunet-service-testbed-logger.c (renamed from src/testbed/gnunet-service-testbed-logger.c)2
-rw-r--r--src/testbed-logger/test_testbed_logger_api.c (renamed from src/testbed/test_testbed_logger_api.c)2
-rw-r--r--src/testbed-logger/test_testbed_logger_api.conf (renamed from src/testbed/test_testbed_logger_api.conf)0
-rw-r--r--src/testbed-logger/testbed-logger.conf.in127
-rw-r--r--src/testbed-logger/testbed_logger_api.c (renamed from src/testbed/testbed_logger_api.c)2
-rw-r--r--src/testbed/Makefile.am28
-rw-r--r--src/testbed/testbed.conf.in11
10 files changed, 190 insertions, 45 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 24c2f583a2..0ce2ac4de6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@
if HAVE_TESTING
TESTING = testing
- TESTBED = testbed
+ TESTBED = testbed-logger testbed
CONSENSUS = consensus
SECRETSHARING = secretsharing
endif
diff --git a/src/nse/Makefile.am b/src/nse/Makefile.am
index ebff9d2511..9a163b1609 100644
--- a/src/nse/Makefile.am
+++ b/src/nse/Makefile.am
@@ -66,7 +66,7 @@ gnunet_service_nse_LDADD = \
$(GN_LIBINTL)
if ENABLE_NSE_HISTOGRAM
gnunet_service_nse_LDADD += \
- $(top_builddir)/src/testbed/libgnunettestbedlogger.la
+ $(top_builddir)/src/testbed-logger/libgnunettestbedlogger.la
endif
@@ -111,5 +111,3 @@ perf_kdf_LDADD = \
EXTRA_DIST = \
test_nse.conf \
nse_profiler_test.conf
-
-
diff --git a/src/testbed-logger/Makefile.am b/src/testbed-logger/Makefile.am
new file mode 100644
index 0000000000..7f372fd022
--- /dev/null
+++ b/src/testbed-logger/Makefile.am
@@ -0,0 +1,57 @@
+# This Makefile.am is in the public domain
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
+
+if MINGW
+ WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
+endif
+
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
+libexecdir= $(pkglibdir)/libexec/
+
+pkgcfgdir= $(pkgdatadir)/config.d/
+
+pkgcfg_DATA = \
+ testbed-logger.conf
+
+libexec_PROGRAMS = \
+ gnunet-service-testbed-logger
+
+gnunet_service_testbed_logger_SOURCES = \
+ gnunet-service-testbed-logger.c
+gnunet_service_testbed_logger_LDADD = \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+lib_LTLIBRARIES = \
+ libgnunettestbedlogger.la
+
+libgnunettestbedlogger_la_SOURCES = \
+ testbed_logger_api.c
+libgnunettestbedlogger_la_LIBADD = $(XLIB) \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(LTLIBINTL)
+libgnunettestbedlogger_la_LDFLAGS = \
+ $(GN_LIB_LDFLAGS) \
+ -version-info 0:0:0
+
+check_PROGRAMS = \
+ test_testbed_logger_api
+
+if ENABLE_TEST_RUN
+ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
+ TESTS = \
+ test_testbed_logger_api
+endif
+
+test_testbed_logger_api_SOURCES = \
+ test_testbed_logger_api.c
+test_testbed_logger_api_LDADD = \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ libgnunettestbedlogger.la
+
+EXTRA_DIST = \
+ test_testbed_logger_api.conf
diff --git a/src/testbed/gnunet-service-testbed-logger.c b/src/testbed-logger/gnunet-service-testbed-logger.c
index 0f9fab01bf..1c250b306e 100644
--- a/src/testbed/gnunet-service-testbed-logger.c
+++ b/src/testbed-logger/gnunet-service-testbed-logger.c
@@ -19,7 +19,7 @@
*/
/**
- * @file testbed/gnunet-service-testbed-logger.c
+ * @file testbed-logger/gnunet-service-testbed-logger.c
* @brief service for collecting messages and writing to a file
* @author Sree Harsha Totakura
*/
diff --git a/src/testbed/test_testbed_logger_api.c b/src/testbed-logger/test_testbed_logger_api.c
index a25c0c5f0c..8f7391f22c 100644
--- a/src/testbed/test_testbed_logger_api.c
+++ b/src/testbed-logger/test_testbed_logger_api.c
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
/**
- * @file testbed/test_testbed_logger_api.c
+ * @file testbed-logger/test_testbed_logger_api.c
* @brief testcases for the testbed logger api
* @author Sree Harsha Totakura
*/
diff --git a/src/testbed/test_testbed_logger_api.conf b/src/testbed-logger/test_testbed_logger_api.conf
index 57ce5c2548..57ce5c2548 100644
--- a/src/testbed/test_testbed_logger_api.conf
+++ b/src/testbed-logger/test_testbed_logger_api.conf
diff --git a/src/testbed-logger/testbed-logger.conf.in b/src/testbed-logger/testbed-logger.conf.in
new file mode 100644
index 0000000000..094328c7b7
--- /dev/null
+++ b/src/testbed-logger/testbed-logger.conf.in
@@ -0,0 +1,127 @@
+[testbed]
+AUTOSTART = NO
+@JAVAPORT@ PORT = 2101
+HOSTNAME = localhost
+BINARY = gnunet-service-testbed
+
+# How long should operations wait?
+OPERATION_TIMEOUT = 30 s
+
+# Set this to the path where the testbed helper is installed. By default the
+# helper binary is searched in @prefix@/lib/gnunet/libexec/
+# HELPER_BINARY_PATH = @prefix@/lib/gnunet/libexec/gnunet-helper-testbed
+
+# Add your local network address here. For example, if you want to run
+# testbed on a group of hosts connected to network 192.168.1.0/24, then set
+# ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24;
+# Multiple network addresses can be given. They should be separated by `;'
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-testbed.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+
+# How many maximum number of operations can be run in parallel. This number
+# should be decreased if the system is getting overloaded and to reduce the load
+# exerted by the emulation.
+MAX_PARALLEL_OPERATIONS = 1000
+MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 1
+
+# What topology should be generated by the helper functions GNUNET_TESTBED_run()
+# and GNUNET_TESTBED_test_run(). This option has no effect if testbed is
+# initialized with other functions. Valid values can be found at:
+# https://gnunet.org/supported-topologies
+OVERLAY_TOPOLOGY = NONE
+
+# Number of random links to be included to the generate the above topology.
+# Note that not all topologies require this option and ignore it. Topologies
+# requiring this option are RANDOM, SMALL_WORLD and SMALL_WORLD ring.
+# OVERLAY_RANDOM_LINKS =
+
+# This option is required if the OVERLAY_TOPOLOGY is set to FROM_FILE. It is
+# ignored for all other topologies. This option should contain the path to
+# the file containing the topology information. The format of the file is
+# presented at: https://gnunet.org/topology-file-format
+# OVERLAY_TOPOLOGY_FILE = /path/to/topology-file
+
+# The following options are required if the OVERLAY_TOPOLOGY is set to
+# SCALE_FREE. They are ignored in all other cases.
+# The number of maximum peers which can connect to a peer
+SCALE_FREE_TOPOLOGY_CAP = 70
+# The minimum number of peers which a peer has to connect
+SCALE_FREE_TOPOLOGY_M = 5
+
+# How many maximum number of handles to peers' services should be kept open at
+# any time. This number also keeps a check on the number of open descriptors as
+# opening a service connection results in opening a file descriptor.
+MAX_PARALLEL_SERVICE_CONNECTIONS = 256
+
+# Size of the internal testbed cache. It is used to cache handles to peers
+# while trying to connect them.
+CACHE_SIZE = 30
+
+# Maximum number of file descriptors a testbed controller is permitted to keep
+# open.
+MAX_OPEN_FDS = 512
+
+# How long should we wait for testbed to setup while using helper functions
+# GNUNET_TESTBED_test_run() and GNUNET_TESTBED_run()
+SETUP_TIMEOUT = 5 m
+
+# Where should testbed write load statistics data
+# STATS_DIR = /tmp/load
+
+# What services should be shared among peers.
+# Format is "[<service:share>] [<service:share>] ...". The shared services are
+# started standalone without any other peer services or a hostkey. For this
+# reason, only services which doesn't depend on other services can only be
+# shared. Example: To share peerinfo among every 10 peers. The following spec
+# will start 5 peerinfo services when 50 peers are started:
+#
+# SHARED_SERVICES = peerinfo:10
+#
+# To share multiple services
+#
+# SHARED_SERVICES = service1:n_share1 service2:n_share2 ...
+#
+# Default is to share no services
+SHARED_SERVICES =
+
+
+[testbed-logger]
+AUTOSTART = NO
+@UNIXONLY@ PORT = 2102
+HOSTNAME = localhost
+BINARY = gnunet-service-testbed-logger
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-gnunet-testbed-logger.sock
+DIR = /tmp
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+
+
+[testbed-barrier]
+AUTOSTART = NO
+@UNIXONLY@ PORT = 2103
+HOSTNAME = localhost
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-testbed-barrier.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+
+
+# This section is related to configuring underlay restrictions to simulate
+# connectivity restrictions of NAT boxes
+[testbed-underlay]
+AUTOSTART = NO
+NOARMBIND = YES
+BINARY = gnunet-daemon-testbed-underlay
+# The sqlite3 database file containing information about what underlay
+# restrictions to apply
+# DBFILE =
+
+[latency-logger]
+AUTOSTART = NO
+NOARMBIND = YES
+BINARY = gnunet-daemon-latency-logger
+# The sqlite3 database file where the latency values are to be stored
+# DBFILE = \ No newline at end of file
diff --git a/src/testbed/testbed_logger_api.c b/src/testbed-logger/testbed_logger_api.c
index aa182e21c6..aaf18cd335 100644
--- a/src/testbed/testbed_logger_api.c
+++ b/src/testbed-logger/testbed_logger_api.c
@@ -19,7 +19,7 @@
*/
/**
- * @file testbed/testbed_logger_api.c
+ * @file testbed-logger/testbed_logger_api.c
* @brief Client-side routines for communicating with the tesbted logger service
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
*/
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am
index 8b5d7457ab..b5a7758f01 100644
--- a/src/testbed/Makefile.am
+++ b/src/testbed/Makefile.am
@@ -27,7 +27,6 @@ endif
libexec_PROGRAMS = \
gnunet-service-testbed \
gnunet-helper-testbed \
- gnunet-service-testbed-logger \
gnunet-daemon-testbed-blacklist \
$(underlay_daemon) \
$(latency_logger)
@@ -59,11 +58,6 @@ gnunet_service_testbed_LDADD = $(XLIB) \
$(top_builddir)/src/arm/libgnunetarm.la \
$(LTLIBINTL) $(Z_LIBS)
-gnunet_service_testbed_logger_SOURCES = \
- gnunet-service-testbed-logger.c
-gnunet_service_testbed_logger_LDADD = \
- $(top_builddir)/src/util/libgnunetutil.la
-
gnunet_testbed_profiler_SOURCES = \
gnunet-testbed-profiler.c
gnunet_testbed_profiler_LDADD = $(XLIB) \
@@ -97,8 +91,7 @@ gnunet_daemon_latency_logger_LDADD = $(XLIB) \
$(LTLIBINTL) -lsqlite3
lib_LTLIBRARIES = \
- libgnunettestbed.la \
- libgnunettestbedlogger.la
+ libgnunettestbed.la
libgnunettestbed_la_SOURCES = \
testbed_api.c testbed_api.h testbed.h \
@@ -125,15 +118,6 @@ libgnunettestbed_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) \
-version-info 0:0:0
-libgnunettestbedlogger_la_SOURCES = \
- testbed_logger_api.c
-libgnunettestbedlogger_la_LIBADD = $(XLIB) \
- $(top_builddir)/src/util/libgnunetutil.la \
- $(LTLIBINTL)
-libgnunettestbedlogger_la_LDFLAGS = \
- $(GN_LIB_LDFLAGS) \
- -version-info 0:0:0
-
generate_underlay_topology_SOURCES = generate-underlay-topology.c
generate_underlay_topology_LDADD = $(XLIB) \
$(top_builddir)/src/util/libgnunetutil.la \
@@ -142,7 +126,6 @@ generate_underlay_topology_LDADD = $(XLIB) \
check_PROGRAMS = \
test_testbed_api_hosts \
- test_testbed_logger_api \
test_gnunet_helper_testbed \
test_testbed_api_controllerlink \
test_testbed_api_2peers_1controller \
@@ -176,7 +159,6 @@ if ENABLE_TEST_RUN
AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
TESTS = \
test_testbed_api \
- test_testbed_logger_api \
test_testbed_api_sd \
test_testbed_api_operations \
test_testbed_api_hosts \
@@ -219,13 +201,6 @@ test_testbed_api_LDADD = \
$(top_builddir)/src/arm/libgnunetarm.la \
libgnunettestbed.la
-test_testbed_logger_api_SOURCES = \
- test_testbed_logger_api.c
-test_testbed_logger_api_LDADD = \
- $(top_builddir)/src/util/libgnunetutil.la \
- $(top_builddir)/src/testing/libgnunettesting.la \
- libgnunettestbedlogger.la
-
test_testbed_api_sd_SOURCES = \
test_testbed_api_sd.c
test_testbed_api_sd_LDADD = \
@@ -398,7 +373,6 @@ EXTRA_DIST = \
test_testbed_api_statistics.conf \
test_testbed_api_test_timeout.conf \
test_testbed_api_template.conf \
- test_testbed_logger_api.conf \
test_testbed_api_testbed_run_topologyring.conf \
test_testbed_api_testbed_run_topologyclique.conf \
test_testbed_api_testbed_run_topologyline.conf \
diff --git a/src/testbed/testbed.conf.in b/src/testbed/testbed.conf.in
index 094328c7b7..86044fbfb5 100644
--- a/src/testbed/testbed.conf.in
+++ b/src/testbed/testbed.conf.in
@@ -89,17 +89,6 @@ SETUP_TIMEOUT = 5 m
SHARED_SERVICES =
-[testbed-logger]
-AUTOSTART = NO
-@UNIXONLY@ PORT = 2102
-HOSTNAME = localhost
-BINARY = gnunet-service-testbed-logger
-UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-gnunet-testbed-logger.sock
-DIR = /tmp
-UNIX_MATCH_UID = YES
-UNIX_MATCH_GID = YES
-
-
[testbed-barrier]
AUTOSTART = NO
@UNIXONLY@ PORT = 2103