diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-22 15:53:02 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-22 15:53:02 +0000 |
commit | 8e896c6775a5603526c584c7bb75d19458fbabba (patch) | |
tree | 14d4213d5601ab64eeb458811b3b4bf5e1f161b3 /src/transport | |
parent | 0f5b3f7e765e07c0201529837b502540820c0e07 (diff) | |
download | gnunet-8e896c6775a5603526c584c7bb75d19458fbabba.tar.gz gnunet-8e896c6775a5603526c584c7bb75d19458fbabba.zip |
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/Makefile.am | 18 | ||||
-rw-r--r-- | src/transport/test_quota_compliance.c | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 102bbb1c4..4813946c7 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -200,7 +200,8 @@ check_PROGRAMS = \ | |||
200 | test_transport_api_reliability_tcp_nat \ | 200 | test_transport_api_reliability_tcp_nat \ |
201 | test_transport_api_reliability_udp \ | 201 | test_transport_api_reliability_udp \ |
202 | $(HTTP_REL_TEST) \ | 202 | $(HTTP_REL_TEST) \ |
203 | $(HTTPS_REL_TEST) | 203 | $(HTTPS_REL_TEST) \ |
204 | test_quota_compliance | ||
204 | # TODO: add tests for nat, etc. | 205 | # TODO: add tests for nat, etc. |
205 | 206 | ||
206 | if !DISABLE_TEST_RUN | 207 | if !DISABLE_TEST_RUN |
@@ -216,7 +217,8 @@ TESTS = \ | |||
216 | test_transport_api_reliability_tcp \ | 217 | test_transport_api_reliability_tcp \ |
217 | test_transport_api_reliability_tcp_nat \ | 218 | test_transport_api_reliability_tcp_nat \ |
218 | $(HTTP_REL_TEST) \ | 219 | $(HTTP_REL_TEST) \ |
219 | $(HTTPS_REL_TEST) | 220 | $(HTTPS_REL_TEST) \ |
221 | test_quota_compliance | ||
220 | endif | 222 | endif |
221 | 223 | ||
222 | test_transport_api_tcp_SOURCES = \ | 224 | test_transport_api_tcp_SOURCES = \ |
@@ -303,6 +305,12 @@ test_transport_api_reliability_https_LDADD = \ | |||
303 | $(top_builddir)/src/transport/libgnunettransport.la \ | 305 | $(top_builddir)/src/transport/libgnunettransport.la \ |
304 | $(top_builddir)/src/util/libgnunetutil.la | 306 | $(top_builddir)/src/util/libgnunetutil.la |
305 | 307 | ||
308 | test_quota_compliance_SOURCES = \ | ||
309 | test_quota_compliance.c | ||
310 | test_quota_compliance_LDADD = \ | ||
311 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
312 | $(top_builddir)/src/util/libgnunetutil.la | ||
313 | |||
306 | endif | 314 | endif |
307 | 315 | ||
308 | EXTRA_DIST = \ | 316 | EXTRA_DIST = \ |
@@ -324,4 +332,8 @@ EXTRA_DIST = \ | |||
324 | test_transport_api_rel_http_peer2.conf \ | 332 | test_transport_api_rel_http_peer2.conf \ |
325 | test_transport_api_rel_https_peer1.conf \ | 333 | test_transport_api_rel_https_peer1.conf \ |
326 | test_transport_api_rel_https_peer2.conf \ | 334 | test_transport_api_rel_https_peer2.conf \ |
327 | test_plugin_transport_data_http.conf | 335 | test_plugin_transport_data_http.conf \ |
336 | test_plugin_transport_data.conf \ | ||
337 | test_quota_compliance_data.conf \ | ||
338 | test_quota_compliance_peer1.conf \ | ||
339 | test_quota_compliance_peer2.conf \ No newline at end of file | ||
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index e24a298d2..22519144a 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -119,12 +119,12 @@ end () | |||
119 | measurement_counter_task = GNUNET_SCHEDULER_NO_TASK; | 119 | measurement_counter_task = GNUNET_SCHEDULER_NO_TASK; |
120 | } | 120 | } |
121 | GNUNET_SCHEDULER_shutdown (sched); | 121 | GNUNET_SCHEDULER_shutdown (sched); |
122 | #if VERBOSE | 122 | #if DEBUG_CONNECTIONS |
123 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n"); | 123 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n"); |
124 | #endif | 124 | #endif |
125 | GNUNET_TRANSPORT_disconnect (p1.th); | 125 | GNUNET_TRANSPORT_disconnect (p1.th); |
126 | GNUNET_TRANSPORT_disconnect (p2.th); | 126 | GNUNET_TRANSPORT_disconnect (p2.th); |
127 | #if VERBOSE | 127 | #if DEBUG_CONNECTIONS |
128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
129 | "Transports disconnected, returning success!\n"); | 129 | "Transports disconnected, returning success!\n"); |
130 | #endif | 130 | #endif |
@@ -334,7 +334,7 @@ static void measure (unsigned long long quota_p1, unsigned long long quota_p2 ) | |||
334 | current_quota_p2 = quota_p2; | 334 | current_quota_p2 = quota_p2; |
335 | #if VERBOSE | 335 | #if VERBOSE |
336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
337 | "Starting measurement: Duration: %u Quota: %u\n", MEASUREMENT_INTERVALL, current_quota_p1); | 337 | "Starting transport level measurement: Duration: %u Quota: %u\n", MEASUREMENT_INTERVALL, current_quota_p1); |
338 | #endif | 338 | #endif |
339 | GNUNET_TRANSPORT_set_quota (p1.th, | 339 | GNUNET_TRANSPORT_set_quota (p1.th, |
340 | &p2.id, | 340 | &p2.id, |