summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-28 12:29:16 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-28 12:29:16 +0000
commit7b7e5f4ca0c3a0d924283148368dfd07449b170c (patch)
tree91d2e7f414709d5d86fd73a4e4a4f21c0d111a07 /src
parent07ec48898b06b41f6b7598a0c99c3a04c20dbc33 (diff)
additional test
Diffstat (limited to 'src')
-rw-r--r--src/transport/Makefile.am34
-rw-r--r--src/transport/test_transport_blacklisting.c19
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf34
-rw-r--r--src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf33
4 files changed, 109 insertions, 11 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index aad49299c..14ab82e5d 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -323,11 +323,6 @@ check_PROGRAMS = \
$(HTTP_SERVER_PLUGIN_TEST) \
$(HTTPS_SERVER_PLUGIN_TEST) \
test_transport_api_blacklisting \
- test_transport_blacklisting_no_bl \
- test_transport_blacklisting_outbound_bl_full \
- test_transport_blacklisting_outbound_bl_plugin \
- test_transport_blacklisting_inbound_bl_plugin \
- test_transport_blacklisting_inbound_bl_full \
test_transport_api_disconnect_tcp \
test_transport_api_bidirectional_connect \
test_transport_api_tcp \
@@ -348,6 +343,12 @@ check_PROGRAMS = \
$(HTTPS_API_TIMEOUT_TEST) \
$(WLAN_API_TEST) \
test_transport_api_multi \
+ test_transport_blacklisting_no_bl \
+ test_transport_blacklisting_outbound_bl_full \
+ test_transport_blacklisting_outbound_bl_plugin \
+ test_transport_blacklisting_inbound_bl_plugin \
+ test_transport_blacklisting_inbound_bl_full \
+ test_transport_blacklisting_multiple_plugins \
test_transport_api_manipulation_send_tcp \
test_transport_api_manipulation_recv_tcp \
test_transport_api_reliability_tcp \
@@ -378,11 +379,6 @@ TESTS = \
$(UNIX_TEST) \
$(WLAN_PLUGIN_TEST) \
test_transport_api_blacklisting \
- test_transport_blacklisting_no_bl \
- test_transport_blacklisting_outbound_bl_full \
- test_transport_blacklisting_outbound_bl_plugin \
- test_transport_blacklisting_inbound_bl_plugin \
- test_transport_blacklisting_inbound_bl_full \
test_transport_api_disconnect_tcp \
test_transport_api_bidirectional_connect \
test_transport_api_tcp \
@@ -402,6 +398,12 @@ TESTS = \
$(HTTPS_API_TIMEOUT_TEST) \
$(WLAN_API_TEST) \
test_transport_api_multi \
+ test_transport_blacklisting_no_bl \
+ test_transport_blacklisting_outbound_bl_full \
+ test_transport_blacklisting_outbound_bl_plugin \
+ test_transport_blacklisting_inbound_bl_plugin \
+ test_transport_blacklisting_inbound_bl_full \
+ test_transport_blacklisting_multiple_plugins \
test_transport_api_manipulation_send_tcp \
test_transport_api_manipulation_recv_tcp \
test_transport_api_reliability_tcp \
@@ -499,6 +501,16 @@ test_transport_blacklisting_inbound_bl_plugin_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
+test_transport_blacklisting_multiple_plugins_SOURCES = \
+ test_transport_blacklisting.c
+test_transport_blacklisting_multiple_plugins_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/transport/libgnunettransporttesting.la
+
+
test_transport_api_disconnect_tcp_SOURCES = \
test_transport_api_disconnect.c
test_transport_api_disconnect_tcp_LDADD = \
@@ -1031,5 +1043,7 @@ test_transport_blacklisting_cfg_blp_peer1_full.conf\
test_transport_blacklisting_cfg_blp_peer1_plugin.conf \
test_transport_blacklisting_cfg_blp_peer2_full.conf\
test_transport_blacklisting_cfg_blp_peer2_plugin.conf \
+test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf \
+test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf \
test_transport_api_http_reverse_peer1.conf \
test_transport_api_http_reverse_peer2.conf
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c
index 8423c641e..b75da26d1 100644
--- a/src/transport/test_transport_blacklisting.c
+++ b/src/transport/test_transport_blacklisting.c
@@ -242,6 +242,22 @@ run_stage (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer2_plugin.conf", 2,
NULL, NULL, NULL, &start_cb, NULL);
}
+ else if (0 == strcmp(test_name, "test_transport_blacklisting_multiple_plugins"))
+ {
+ p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf", 1,
+ NULL, NULL, NULL, &start_cb, NULL);
+
+ p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf", 2,
+ NULL, NULL, NULL, &start_cb, NULL);
+ }
+
+
+ if ((NULL == p1) || (NULL == p2))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start peers\n");
+ ok = 1;
+ GNUNET_SCHEDULER_add_now (&end, NULL);
+ }
timeout_task = GNUNET_SCHEDULER_add_delayed (CONNECT_TIMEOUT, &connect_timeout, NULL);
stage ++;
@@ -270,7 +286,8 @@ run_stage (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
(GNUNET_NO == started) ? "NOT STARTED" : "STARTED",
(GNUNET_YES == connected) ? "CONNECTED" : "NOT CONNECTED");
- if (0 == strcmp(test_name, "test_transport_blacklisting_no_bl"))
+ if ((0 == strcmp(test_name, "test_transport_blacklisting_no_bl")) ||
+ (0 == strcmp(test_name, "test_transport_blacklisting_multiple_plugins")))
{
if ((GNUNET_NO != started) && (GNUNET_YES == connected))
ok = 0;
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf
new file mode 100644
index 000000000..ff78c6829
--- /dev/null
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf
@@ -0,0 +1,34 @@
+@INLINE@ template_cfg_peer1.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-tcp-p1/
+
+[transport-tcp]
+PORT = 12000
+TIMEOUT = 5 s
+
+[arm]
+PORT = 12005
+DEFAULTSERVICES = transport
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12004
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12003
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12002
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[transport]
+#PREFIX = valgrind --leak-check=full
+PORT = 12001
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+PLUGINS = tcp udp
+
+[transport-blacklist-AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520]
+P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G = tcp
+ \ No newline at end of file
diff --git a/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf
new file mode 100644
index 000000000..58a6c70a0
--- /dev/null
+++ b/src/transport/test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf
@@ -0,0 +1,33 @@
+@INLINE@ template_cfg_peer2.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-tcp-p2/
+
+[transport-tcp]
+PORT = 12015
+TIMEOUT = 5 s
+
+[arm]
+PORT = 12014
+DEFAULTSERVICES = transport
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12013
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12012
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12011
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[transport]
+#PREFIX = valgrind --leak-check=full
+PORT = 12010
+PLUGINS = tcp udp
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+
+[transport-blacklist-P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G]
+AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520 = tcp udp \ No newline at end of file