summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/Makefile.am57
-rw-r--r--src/transport/test_transport_api_http_peer1.conf4
-rw-r--r--src/transport/test_transport_api_http_peer2.conf2
-rw-r--r--src/transport/test_transport_api_timeout.c (renamed from src/transport/test_transport_api_multiaddress.c)14
-rw-r--r--src/transport/test_transport_api_timeout_http_peer1.conf42
-rw-r--r--src/transport/test_transport_api_timeout_http_peer2.conf38
-rw-r--r--src/transport/test_transport_api_timeout_https_peer1.conf35
-rw-r--r--src/transport/test_transport_api_timeout_https_peer2.conf36
-rw-r--r--src/transport/test_transport_api_timeout_tcp_peer1.conf (renamed from src/transport/test_transport_api_multiaddress_tcp_peer1.conf)0
-rw-r--r--src/transport/test_transport_api_timeout_tcp_peer2.conf (renamed from src/transport/test_transport_api_multiaddress_tcp_peer2.conf)0
-rw-r--r--src/transport/test_transport_api_unreliability.c2
11 files changed, 191 insertions, 39 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index a421e089a..a76e74804 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -7,14 +7,14 @@ if HAVE_MHD
if HAVE_EXPERIMENTAL
GN_LIBMHD = -lmicrohttpd
HTTP_PLUGIN_LA = libgnunet_plugin_transport_http.la
-# HTTP_PLUGIN_TEST = test_plugin_transport_http
HTTP_API_TEST = test_transport_api_http
+ HTTP_API_TIMEOUT_TEST = test_transport_api_timeout_http
HTTP_REL_TEST = test_transport_api_reliability_http
HTTP_QUOTA_TEST = test_quota_compliance_http \
test_quota_compliance_http_asymmetric_recv_constant
HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la
-# HTTPS_PLUGIN_TEST = test_plugin_transport_https
HTTPS_API_TEST = test_transport_api_https
+ HTTPS_API_TIMEOUT_TEST = test_transport_api_timeout_https
HTTPS_REL_TEST = test_transport_api_reliability_https
HTTPS_QUOTA_TEST = test_quota_compliance_https \
test_quota_compliance_https_asymmetric_recv_constant
@@ -253,17 +253,17 @@ check_PROGRAMS = \
test_transport_testing \
test_transport_startonly \
test_transport_api_disconnect \
- test_transport_api_multiaddress_tcp \
test_transport_api_tcp \
+ test_transport_api_timeout_tcp \
test_transport_api_limited_sockets_tcp \
test_transport_api_tcp_nat \
test_transport_api_udp \
$(UNIX_PLUGIN_TEST) \
test_transport_api_udp_nat \
- $(HTTP_PLUGIN_TEST) \
$(HTTP_API_TEST) \
- $(HTTPS_PLUGIN_TEST) \
+ $(HTTP_API_TIMEOUT_TEST) \
$(HTTPS_API_TEST) \
+ $(HTTPS_API_TIMEOUT_TEST) \
test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
@@ -288,17 +288,17 @@ TESTS = \
test_transport_testing \
test_transport_startonly \
test_transport_api_disconnect \
- test_transport_api_multiaddress_tcp \
test_transport_api_tcp \
+ test_transport_api_timeout_tcp \
test_transport_api_limited_sockets_tcp \
test_transport_api_tcp_nat \
test_transport_api_udp \
$(UNIX_PLUGIN_TEST) \
test_transport_api_udp_nat \
- $(HTTP_PLUGIN_TEST) \
$(HTTP_API_TEST) \
- $(HTTPS_PLUGIN_TEST) \
+ $(HTTP_API_TIMEOUT_TEST) \
$(HTTPS_API_TEST) \
+ $(HTTPS_API_TIMEOUT_TEST) \
test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
@@ -384,14 +384,30 @@ test_transport_api_reliability_tcp_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
-test_transport_api_multiaddress_tcp_SOURCES = \
- test_transport_api_multiaddress.c
-test_transport_api_multiaddress_tcp_LDADD = \
+test_transport_api_timeout_tcp_SOURCES = \
+ test_transport_api_timeout.c
+test_transport_api_timeout_tcp_LDADD = \
$(top_builddir)/src/transport/libgnunettransport.la \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
+test_transport_api_timeout_http_SOURCES = \
+ test_transport_api_timeout.c
+test_transport_api_timeout_http_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/transport/libgnunettransporttesting.la
+
+test_transport_api_timeout_https_SOURCES = \
+ test_transport_api_timeout.c
+test_transport_api_timeout_https_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/transport/libgnunettransporttesting.la
+
test_transport_api_reliability_tcp_nat_SOURCES = \
test_transport_api_reliability.c
test_transport_api_reliability_tcp_nat_LDADD = \
@@ -464,14 +480,6 @@ test_transport_api_reliability_http_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
-#test_plugin_transport_https_SOURCES = \
-# test_plugin_transport_https.c
-#test_plugin_transport_https_LDADD = \
-# $(top_builddir)/src/statistics/libgnunetstatistics.la \
-# @LIBCURL@ \
-# $(top_builddir)/src/hello/libgnunethello.la \
-# $(top_builddir)/src/util/libgnunetutil.la
-
test_transport_api_https_SOURCES = \
test_transport_api.c
test_transport_api_https_LDADD = \
@@ -597,12 +605,6 @@ test_quota_compliance_udp_asymmetric_recv_constant_LDADD = \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/util/libgnunetutil.la
-#test_quota_compliance_udp_asymmetric_send_constant_SOURCES = \
-# test_quota_compliance.c
-#test_quota_compliance_udp_asymmetric_send_constant_LDADD = \
-# $(top_builddir)/src/transport/libgnunettransport.la \
-# $(top_builddir)/src/util/libgnunetutil.la
-
test_quota_compliance_unix_SOURCES = \
test_quota_compliance.c
test_quota_compliance_unix_LDADD = \
@@ -617,7 +619,6 @@ test_quota_compliance_unix_asymmetric_recv_constant_LDADD = \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/util/libgnunetutil.la
-
test_transport_api_multi_SOURCES = \
test_transport_api.c
test_transport_api_multi_LDADD = \
@@ -652,8 +653,8 @@ test_transport_api_https_peer1.conf\
test_transport_api_https_peer2.conf\
test_transport_api_limited_sockets_tcp_peer1.conf\
test_transport_api_limited_sockets_tcp_peer2.conf\
-test_transport_api_multiaddress_tcp_peer1.conf\
-test_transport_api_multiaddress_tcp_peer2.conf\
+test_transport_api_timeout_tcp_peer1.conf\
+test_transport_api_timeout_tcp_peer2.conf\
test_transport_api_multi_peer1.conf\
test_transport_api_multi_peer2.conf\
test_transport_api_reliability_http_peer1.conf\
diff --git a/src/transport/test_transport_api_http_peer1.conf b/src/transport/test_transport_api_http_peer1.conf
index 5525bc5ab..c322c36c1 100644
--- a/src/transport/test_transport_api_http_peer1.conf
+++ b/src/transport/test_transport_api_http_peer1.conf
@@ -8,7 +8,7 @@ DISABLEV6 = NO
[transport-http]
PORT = 12080
-USE_IPv6 = NO
+USE_IPv6 = YES
USE_IPv4 = YES
DISABLEV6 = NO
#BINDTO = 127.0.0.1
@@ -32,7 +32,7 @@ PORT = 12082
UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
[transport]
-DEBUG = YES
+#DEBUG = YES
PORT = 12081
PLUGINS = http
#BINARY = .libs/gnunet-service-transport
diff --git a/src/transport/test_transport_api_http_peer2.conf b/src/transport/test_transport_api_http_peer2.conf
index 39c2639c2..1f5087e04 100644
--- a/src/transport/test_transport_api_http_peer2.conf
+++ b/src/transport/test_transport_api_http_peer2.conf
@@ -11,7 +11,7 @@ PORT = 12090
USE_IPv6 = YES
USE_IPv4 = YES
DISABLEV6 = NO
-BINDTO = 127.0.0.1
+#BINDTO = 127.0.0.1
[arm]
PORT = 12095
diff --git a/src/transport/test_transport_api_multiaddress.c b/src/transport/test_transport_api_timeout.c
index 1096df840..cec60e989 100644
--- a/src/transport/test_transport_api_multiaddress.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -18,13 +18,13 @@
Boston, MA 02111-1307, USA.
*/
/**
- * @file transport/test_transport_api.c
- * @brief base test case for transport implementations
+ * @file transport/test_transport_api_timeout.c
+ * @brief test case for transport plugin implementations complying timeout
+ * settings
*
- * This test case serves as a base for tcp, udp, and udp-nat
- * transport test cases. Based on the executable being run
- * the correct test case will be performed. Conservation of
- * C code apparently.
+ *
+ * This test case serves ensures that no peer disconnect events occurs
+ * while plugins are idle
*/
#include "platform.h"
@@ -346,4 +346,4 @@ main (int argc, char *argv[])
return ret;
}
-/* end of test_transport_api.c */
+/* end of test_transport_api_timeout.c*/
diff --git a/src/transport/test_transport_api_timeout_http_peer1.conf b/src/transport/test_transport_api_timeout_http_peer1.conf
new file mode 100644
index 000000000..c322c36c1
--- /dev/null
+++ b/src/transport/test_transport_api_timeout_http_peer1.conf
@@ -0,0 +1,42 @@
+@INLINE@ test_transport_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-http-p1/
+DEFAULTCONFIG = test_transport_api_http_peer1.conf
+
+[nat]
+DISABLEV6 = NO
+
+[transport-http]
+PORT = 12080
+USE_IPv6 = YES
+USE_IPv4 = YES
+DISABLEV6 = NO
+#BINDTO = 127.0.0.1
+#BINDTO6 = ::1
+
+[arm]
+PORT = 12085
+DEFAULTSERVICES = transport
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12084
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12083
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12082
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[transport]
+#DEBUG = YES
+PORT = 12081
+PLUGINS = http
+#BINARY = .libs/gnunet-service-transport
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+#PREFIX = valgrind --leak-check=full
+#PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args
+
diff --git a/src/transport/test_transport_api_timeout_http_peer2.conf b/src/transport/test_transport_api_timeout_http_peer2.conf
new file mode 100644
index 000000000..1f5087e04
--- /dev/null
+++ b/src/transport/test_transport_api_timeout_http_peer2.conf
@@ -0,0 +1,38 @@
+@INLINE@ test_transport_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-http-p2/
+DEFAULTCONFIG = test_transport_api_http_peer2.conf
+
+[nat]
+DISABLEV6 = NO
+
+[transport-http]
+PORT = 12090
+USE_IPv6 = YES
+USE_IPv4 = YES
+DISABLEV6 = NO
+#BINDTO = 127.0.0.1
+
+[arm]
+PORT = 12095
+DEFAULTSERVICES = transport
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12094
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12093
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12092
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[transport]
+DEBUG = YES
+PORT = 12091
+PLUGINS = http
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+#PREFIX = valgrind --leak-check=full
diff --git a/src/transport/test_transport_api_timeout_https_peer1.conf b/src/transport/test_transport_api_timeout_https_peer1.conf
new file mode 100644
index 000000000..7a3a225f0
--- /dev/null
+++ b/src/transport/test_transport_api_timeout_https_peer1.conf
@@ -0,0 +1,35 @@
+@INLINE@ test_transport_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-https-p1/
+DEFAULTCONFIG = test_transport_api_https_peer1.conf
+
+[transport-https]
+PORT = 12100
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+KEY_FILE = $SERVICEHOME/https_key_p1.key
+CERT_FILE = $SERVICEHOME/https_cert_p1.crt
+USE_IPv6 = YES
+USE_IPv4 = YES
+
+[arm]
+PORT = 12105
+
+[statistics]
+PORT = 12104
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12103
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12102
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[transport]
+PORT = 12101
+PLUGINS = https
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+DEBUG = NO
+
+
diff --git a/src/transport/test_transport_api_timeout_https_peer2.conf b/src/transport/test_transport_api_timeout_https_peer2.conf
new file mode 100644
index 000000000..2c45b27f7
--- /dev/null
+++ b/src/transport/test_transport_api_timeout_https_peer2.conf
@@ -0,0 +1,36 @@
+@INLINE@ test_transport_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-https-p2/
+DEFAULTCONFIG = test_transport_api_https_peer2.conf
+
+[transport-https]
+PORT = 12110
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+KEY_FILE = $SERVICEHOME/https_key_p2.key
+CERT_FILE = $SERVICEHOME/https_cert_p2.crt
+USE_IPv6 = YES
+USE_IPv4 = YES
+
+[arm]
+PORT = 12115
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12114
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12113
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12112
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[transport]
+PORT = 12111
+PLUGINS = https
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+DEBUG = NO
+
+
diff --git a/src/transport/test_transport_api_multiaddress_tcp_peer1.conf b/src/transport/test_transport_api_timeout_tcp_peer1.conf
index 974481fde..974481fde 100644
--- a/src/transport/test_transport_api_multiaddress_tcp_peer1.conf
+++ b/src/transport/test_transport_api_timeout_tcp_peer1.conf
diff --git a/src/transport/test_transport_api_multiaddress_tcp_peer2.conf b/src/transport/test_transport_api_timeout_tcp_peer2.conf
index 0d4869f77..0d4869f77 100644
--- a/src/transport/test_transport_api_multiaddress_tcp_peer2.conf
+++ b/src/transport/test_transport_api_timeout_tcp_peer2.conf
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 5d4f86820..9a30f54b8 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -39,7 +39,7 @@
#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
#define VERBOSE_ARM GNUNET_NO