diff options
author | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2011-10-17 14:14:22 +0000 |
---|---|---|
committer | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2011-10-17 14:14:22 +0000 |
commit | b8b6c99084cef3e8d2af240fc48fbf7a6cf6b664 (patch) | |
tree | 4371348dd3b48a146717259f19f2b94e2d7a6432 | |
parent | 075856355ae7ee79380dcf8978e7ba51a473f7a9 (diff) |
git-svn-id: https://gnunet.org/svn/gnunet@17549 140774ce-b5e7-0310-ab8b-a85725594a96
17 files changed, 89 insertions, 113 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index c156d483f1..142d4de25b 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -281,7 +281,6 @@ check_PROGRAMS = \ test_quota_compliance_tcp \ test_quota_compliance_tcp_asymmetric \ test_quota_compliance_udp \ - test_quota_compliance_udp_asymmetric \ $(UNIX_QUOTA_TEST) \ $(HTTP_QUOTA_TEST) \ $(HTTPS_QUOTA_TEST) \ @@ -320,7 +319,6 @@ TESTS = \ test_quota_compliance_tcp \ test_quota_compliance_tcp_asymmetric \ test_quota_compliance_udp \ - test_quota_compliance_udp_asymmetric \ $(UNIX_QUOTA_TEST) \ $(HTTP_QUOTA_TEST) \ $(HTTPS_QUOTA_TEST) \ @@ -646,14 +644,6 @@ test_quota_compliance_udp_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/transport/libgnunettransporttesting.la -test_quota_compliance_udp_asymmetric_SOURCES = \ - test_quota_compliance.c -test_quota_compliance_udp_asymmetric_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_quota_compliance_unix_SOURCES = \ test_quota_compliance.c test_quota_compliance_unix_LDADD = \ diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 2eacbd7650..ec4b9a8db0 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c @@ -36,7 +36,7 @@ #include "transport.h" #include "transport-testing.h" -#define VERBOSE GNUNET_YES +#define VERBOSE GNUNET_NO #define VERBOSE_ARM GNUNET_EXTRA_LOGGING @@ -52,7 +52,7 @@ */ #define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) -#define DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) +#define DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) static char *test_source; @@ -90,6 +90,7 @@ struct GNUNET_TRANSPORT_TESTING_handle * tth; static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; + /* * Testcase specific declarations */ @@ -497,13 +498,13 @@ run_measurement (unsigned long long p1_quota_in, unsigned long long p1_quota_out "Generated config file `%s'\n", gen_cfg_p2); - p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth, gen_cfg_p1, 1, + p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth, cfg_file_p1, 1, ¬ify_receive, ¬ify_connect, ¬ify_disconnect, &start_cb, NULL); - p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, gen_cfg_p2, 2, + p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, cfg_file_p2, 2, ¬ify_receive, ¬ify_connect, ¬ify_disconnect, &start_cb, @@ -632,7 +633,7 @@ main (int argc, char *argv[]) GNUNET_TRANSPORT_TESTING_done (tth); - return ret; + return test_failed; } diff --git a/src/transport/test_quota_compliance_http_peer1.conf b/src/transport/test_quota_compliance_http_peer1.conf index 872a753651..06d0e275db 100644 --- a/src/transport/test_quota_compliance_http_peer1.conf +++ b/src/transport/test_quota_compliance_http_peer1.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test_quota_compliance_peer1 DEFAULTCONFIG = test_quota_compliance_http_peer1.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-http] PORT = 4010 DEBUG = NO diff --git a/src/transport/test_quota_compliance_http_peer2.conf b/src/transport/test_quota_compliance_http_peer2.conf index 256dc61eb5..d3a039cfa0 100644 --- a/src/transport/test_quota_compliance_http_peer2.conf +++ b/src/transport/test_quota_compliance_http_peer2.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test_quota_compliance_peer2 DEFAULTCONFIG = test_quota_compliance_http_peer2.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-http] PORT = 3010 DEBUG = NO diff --git a/src/transport/test_quota_compliance_https_peer1.conf b/src/transport/test_quota_compliance_https_peer1.conf index 47f93096c7..8859304bba 100644 --- a/src/transport/test_quota_compliance_https_peer1.conf +++ b/src/transport/test_quota_compliance_https_peer1.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test_quota_compliance_peer1/ DEFAULTCONFIG = test_quota_compliance_https_peer1.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-https] PORT = 4001 CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL diff --git a/src/transport/test_quota_compliance_https_peer2.conf b/src/transport/test_quota_compliance_https_peer2.conf index 79bf0331ff..afe4824bdb 100644 --- a/src/transport/test_quota_compliance_https_peer2.conf +++ b/src/transport/test_quota_compliance_https_peer2.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test_quota_compliance_peer2 DEFAULTCONFIG = test_quota_compliance_https_peer2.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-https] PORT = 3001 CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL diff --git a/src/transport/test_quota_compliance_tcp_asymmetric_peer1.conf b/src/transport/test_quota_compliance_tcp_asymmetric_peer1.conf index ff63514b10..47f6a639cc 100644 --- a/src/transport/test_quota_compliance_tcp_asymmetric_peer1.conf +++ b/src/transport/test_quota_compliance_tcp_asymmetric_peer1.conf @@ -1,7 +1,11 @@ @INLINE@ template_cfg_peer1.conf [PATHS] SERVICEHOME = /tmp/test-transport/quota-tcp-p1/ -DEFAULTCONFIG = test_quota_compliance_tcp_peer1.conf +DEFAULTCONFIG = test_quota_compliance_tcp_asymmetric_peer1.conf + +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 [transport-tcp] PORT = 4094 diff --git a/src/transport/test_quota_compliance_tcp_asymmetric_peer2.conf b/src/transport/test_quota_compliance_tcp_asymmetric_peer2.conf index 608c49a074..d9c182be52 100644 --- a/src/transport/test_quota_compliance_tcp_asymmetric_peer2.conf +++ b/src/transport/test_quota_compliance_tcp_asymmetric_peer2.conf @@ -1,32 +1,34 @@ @INLINE@ template_cfg_peer2.conf [PATHS] -SERVICEHOME = /tmp/test_quota_compliance_peer2 -DEFAULTCONFIG = test_quota_compliance_tcp_peer2.conf +SERVICEHOME = /tmp/test-transport/quota-tcp-p2/ +DEFAULTCONFIG = test_quota_compliance_tcp_asymmetric_peer2.conf -[transport-tcp] -PORT = 3094 +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 -[transport-udp] -PORT = 3094 +[transport-tcp] +PORT = 12015 +TIMEOUT = 5000 [arm] -PORT = 3087 -UNIXPATH = /tmp/test_quota_compliance_tcp_arm_peer2.sock +PORT = 12014 +DEFAULTSERVICES = transport +UNIXPATH = /tmp/gnunet-p2-service-arm.sock [statistics] -PORT = 3088 -UNIXPATH = /tmp/test_quota_compliance_tcp_statistics_peer2.sock +PORT = 12013 +UNIXPATH = /tmp/gnunet-p2-service-statistics.sock [resolver] -PORT = 3089 -UNIXPATH = /tmp/test_quota_compliance_tcp_resolver_peer2.sock +PORT = 12012 +UNIXPATH = /tmp/gnunet-p2-service-resolver.sock [peerinfo] -PORT = 3090 -UNIXPATH = /tmp/test_quota_compliance_tcp_peerinfo_peer2.sock +PORT = 12011 +UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock [transport] -PORT = 3091 -UNIXPATH = /tmp/test_quota_compliance_tcp_transport_peer2.sock - +PORT = 12010 +UNIXPATH = /tmp/gnunet-p2-service-transport.sock diff --git a/src/transport/test_quota_compliance_tcp_peer1.conf b/src/transport/test_quota_compliance_tcp_peer1.conf index ff63514b10..f92d9cd98f 100644 --- a/src/transport/test_quota_compliance_tcp_peer1.conf +++ b/src/transport/test_quota_compliance_tcp_peer1.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test-transport/quota-tcp-p1/ DEFAULTCONFIG = test_quota_compliance_tcp_peer1.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-tcp] PORT = 4094 diff --git a/src/transport/test_quota_compliance_tcp_peer2.conf b/src/transport/test_quota_compliance_tcp_peer2.conf index 608c49a074..5fe5d070e8 100644 --- a/src/transport/test_quota_compliance_tcp_peer2.conf +++ b/src/transport/test_quota_compliance_tcp_peer2.conf @@ -1,32 +1,34 @@ @INLINE@ template_cfg_peer2.conf [PATHS] -SERVICEHOME = /tmp/test_quota_compliance_peer2 +SERVICEHOME = /tmp/test-transport/api-tcp-p2/ DEFAULTCONFIG = test_quota_compliance_tcp_peer2.conf -[transport-tcp] -PORT = 3094 +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 -[transport-udp] -PORT = 3094 +[transport-tcp] +PORT = 12015 +TIMEOUT = 5000 [arm] -PORT = 3087 -UNIXPATH = /tmp/test_quota_compliance_tcp_arm_peer2.sock +PORT = 12014 +DEFAULTSERVICES = transport +UNIXPATH = /tmp/gnunet-p2-service-arm.sock [statistics] -PORT = 3088 -UNIXPATH = /tmp/test_quota_compliance_tcp_statistics_peer2.sock +PORT = 12013 +UNIXPATH = /tmp/gnunet-p2-service-statistics.sock [resolver] -PORT = 3089 -UNIXPATH = /tmp/test_quota_compliance_tcp_resolver_peer2.sock +PORT = 12012 +UNIXPATH = /tmp/gnunet-p2-service-resolver.sock [peerinfo] -PORT = 3090 -UNIXPATH = /tmp/test_quota_compliance_tcp_peerinfo_peer2.sock +PORT = 12011 +UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock [transport] -PORT = 3091 -UNIXPATH = /tmp/test_quota_compliance_tcp_transport_peer2.sock - +PORT = 12010 +UNIXPATH = /tmp/gnunet-p2-service-transport.sock diff --git a/src/transport/test_quota_compliance_udp_asymmetric_peer1.conf b/src/transport/test_quota_compliance_udp_asymmetric_peer1.conf deleted file mode 100644 index 4848b065ee..0000000000 --- a/src/transport/test_quota_compliance_udp_asymmetric_peer1.conf +++ /dev/null @@ -1,30 +0,0 @@ -@INLINE@ template_cfg_peer2.conf -[PATHS] -SERVICEHOME = /tmp/test_quota_compliance_peer1/ -DEFAULTCONFIG = test_quota_compliance_udp_peer1.conf - -[transport-udp] -PORT = 4368 -MAX_BPS = 50000000 - -[arm] -PORT = 4087 -UNIXPATH = /tmp/test_quota_compliance_udp_arm_peer1.sock - -[statistics] -PORT = 4088 -UNIXPATH = /tmp/test_quota_compliance_udp_statistics_peer1.sock - -[resolver] -PORT = 4089 -UNIXPATH = /tmp/test_quota_compliance_udp_resolver_peer1.sock - -[peerinfo] -PORT = 4090 -UNIXPATH = /tmp/test_quota_compliance_udp_peerinfo_peer1.sock - -[transport] -PORT = 4091 -PLUGINS = udp -UNIXPATH = /tmp/test_quota_compliance_udp_transport_peer1.sock - diff --git a/src/transport/test_quota_compliance_udp_asymmetric_peer2.conf b/src/transport/test_quota_compliance_udp_asymmetric_peer2.conf deleted file mode 100644 index 4b58c934f2..0000000000 --- a/src/transport/test_quota_compliance_udp_asymmetric_peer2.conf +++ /dev/null @@ -1,31 +0,0 @@ -@INLINE@ template_cfg_peer2.conf -[PATHS] -SERVICEHOME = /tmp/test_quota_compliance_peer2 -DEFAULTCONFIG = test_quota_compliance_udp_peer2.conf - -[transport-udp] -PORT = 3368 -MAX_BPS = 50000000 - -[arm] -PORT = 3087 -UNIXPATH = /tmp/test_quota_compliance_udp_arm_peer2.sock - -[statistics] -PORT = 3088 -UNIXPATH = /tmp/test_quota_compliance_udp_statistics_peer2.sock - -[resolver] -PORT = 3089 -UNIXPATH = /tmp/test_quota_compliance_udp_resolver_peer2.sock - -[peerinfo] -PORT = 3090 -UNIXPATH = /tmp/test_quota_compliance_udp_peerinfo_peer2.sock - -[transport] -PORT = 3091 -PLUGINS = udp -UNIXPATH = /tmp/test_quota_compliance_udp_transport_peer2.sock - - diff --git a/src/transport/test_quota_compliance_udp_peer1.conf b/src/transport/test_quota_compliance_udp_peer1.conf index 4848b065ee..3e52c21670 100644 --- a/src/transport/test_quota_compliance_udp_peer1.conf +++ b/src/transport/test_quota_compliance_udp_peer1.conf @@ -1,8 +1,12 @@ -@INLINE@ template_cfg_peer2.conf +@INLINE@ template_cfg_peer1.conf [PATHS] SERVICEHOME = /tmp/test_quota_compliance_peer1/ DEFAULTCONFIG = test_quota_compliance_udp_peer1.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-udp] PORT = 4368 MAX_BPS = 50000000 diff --git a/src/transport/test_quota_compliance_udp_peer2.conf b/src/transport/test_quota_compliance_udp_peer2.conf index 4b58c934f2..d6d928f7ca 100644 --- a/src/transport/test_quota_compliance_udp_peer2.conf +++ b/src/transport/test_quota_compliance_udp_peer2.conf @@ -1,8 +1,14 @@ @INLINE@ template_cfg_peer2.conf +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 [PATHS] SERVICEHOME = /tmp/test_quota_compliance_peer2 DEFAULTCONFIG = test_quota_compliance_udp_peer2.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-udp] PORT = 3368 MAX_BPS = 50000000 diff --git a/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf b/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf index fa24517ee4..a2d1bdd187 100644 --- a/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf +++ b/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf @@ -1,4 +1,4 @@ -@INLINE@ template_cfg_peer1.conf +@INLINE@ template_cfg_peer2.conf [PATHS] SERVICEHOME = /tmp/test_quota_compliance_peer2 DEFAULTCONFIG = test_quota_compliance_unix_asymmetric_peer2.conf diff --git a/src/transport/test_quota_compliance_unix_peer1.conf b/src/transport/test_quota_compliance_unix_peer1.conf index 60e656bad4..20844227aa 100644 --- a/src/transport/test_quota_compliance_unix_peer1.conf +++ b/src/transport/test_quota_compliance_unix_peer1.conf @@ -3,6 +3,10 @@ SERVICEHOME = /tmp/test_quota_compliance_peer1/ DEFAULTCONFIG = test_quota_compliance_unix_peer1.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-unix] PORT = 12120 diff --git a/src/transport/test_quota_compliance_unix_peer2.conf b/src/transport/test_quota_compliance_unix_peer2.conf index 42db979a26..332226a84c 100644 --- a/src/transport/test_quota_compliance_unix_peer2.conf +++ b/src/transport/test_quota_compliance_unix_peer2.conf @@ -1,8 +1,12 @@ -@INLINE@ template_cfg_peer1.conf +@INLINE@ template_cfg_peer2.conf [PATHS] SERVICEHOME = /tmp/test_quota_compliance_peer2 DEFAULTCONFIG = test_quota_compliance_unix_peer2.conf +[core] +TOTAL_QUOTA_IN = 10000 +TOTAL_QUOTA_OUT = 10000 + [transport-unix] PORT = 12136 |